aherbert commented on code in PR #316:
URL: 
https://github.com/apache/commons-collections/pull/316#discussion_r909376788


##########
src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java:
##########
@@ -231,7 +231,29 @@ public boolean forEachIndex(IntPredicate consumer) {
     @Override
     public boolean forEachBitMap(LongPredicate consumer) {
         Objects.requireNonNull(consumer, "consumer");
-        return BitMapProducer.fromIndexProducer(this, 
shape.getNumberOfBits()).forEachBitMap(consumer);
+        int blocksm1 = BitMap.numberOfBitMaps(shape.getNumberOfBits()) - 1;

Review Comment:
   `final int blocksm1`
   
   Although it is the same number I would prefer `counts.length` here and not 
`shape.getNumberOfBits()` since it is the total length of the counts array that 
is being iterated over.



-- 
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]

Reply via email to