AdityaTeltia commented on code in PR #15161:
URL: https://github.com/apache/lucene/pull/15161#discussion_r2346008622


##########
lucene/test-framework/src/java/org/apache/lucene/tests/util/BaseBitSetTestCase.java:
##########
@@ -65,6 +61,8 @@ static java.util.BitSet randomSet(int numBits, float 
percentSet) {
     return randomSet(numBits, (int) (percentSet * numBits));
   }
 
+  protected abstract T fromJavaUtilBitSet(java.util.BitSet set, int numBits);

Review Comment:
   tried refactoring it using java.util.Bitset.
   Had to hack through two issues.
   1. `java.util.BitSet.nextSetBit()` returns  `-1` when there are no more set 
bits while lucene Bitset return `DocIdSetIterator.NO_MORE_DOCS` i.e. 2147483647.
   2. `java.util.BitSet.clear()` throws error if from > to while lucene does 
nothing.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to