Claudenw commented on code in PR #329:
URL: 
https://github.com/apache/commons-collections/pull/329#discussion_r946468053


##########
src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java:
##########
@@ -38,17 +47,12 @@ public interface BloomFilter extends IndexProducer, 
BitMapProducer {
     // Query Operations
 
     /**
-     * This method is used to determine the best method for matching.
-     *
-     * <p>For `sparse` implementations
-     * the {@code forEachIndex(IntConsumer consumer)} method is more 
efficient.  For non `sparse` implementations
-     * the {@code forEachBitMap(LongConsumer consumer)} is more efficient.  
Implementers should determine if it is easier
-     * for the implementation to produce indexes of bit map blocks.</p>
-     *
-     * @return {@code true} if the implementation is sparse {@code false} 
otherwise.
-     * @see BitMap
+     * Returns the bitmap of characteristics of the filter.

Review Comment:
   fixed



##########
src/main/java/org/apache/commons/collections4/bloomfilter/BloomFilter.java:
##########
@@ -144,7 +148,7 @@ default boolean merge(Hasher hasher) {
         Objects.requireNonNull(hasher, "hasher");
         Shape shape = getShape();
         // create the bloomfilter that is most likely to merge quickly with 
this one
-        BloomFilter result = isSparse() ? new SparseBloomFilter(shape, hasher) 
: new SimpleBloomFilter(shape, hasher);
+        BloomFilter result = (characteristics()&SPARSE)>0 ? new 
SparseBloomFilter(shape, hasher) : new SimpleBloomFilter(shape, hasher);

Review Comment:
   fixed



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