jpountz commented on code in PR #14720: URL: https://github.com/apache/lucene/pull/14720#discussion_r2110084706
########## lucene/core/src/java/org/apache/lucene/util/BytesRefHash.java: ########## @@ -71,9 +72,13 @@ public BytesRefHash(ByteBlockPool pool) { /** Creates a new {@link BytesRefHash} */ public BytesRefHash(ByteBlockPool pool, int capacity, BytesStartArray bytesStartArray) { + if ((capacity & (capacity - 1)) != 0) { Review Comment: Can you use `BitUtil#isZeroOrPowerOfTwo`? -- 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