mayya-sharipova commented on code in PR #11743: URL: https://github.com/apache/lucene/pull/11743#discussion_r962071131
########## lucene/core/src/java/org/apache/lucene/util/hnsw/NeighborArray.java: ########## @@ -104,8 +104,8 @@ public void removeLast() { } public void removeIndex(int idx) { - System.arraycopy(node, idx + 1, node, idx, size - idx); - System.arraycopy(score, idx + 1, score, idx, size - idx); + System.arraycopy(node, idx + 1, node, idx, size - idx - 1); Review Comment: Thank you for bringing my attention to this, I checked, and indeed `length=0` is permissible in `System.arraycopy` function. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org