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


##########
src/test/java/org/apache/commons/collections4/bloomfilter/DefaultBloomFilterTest.java:
##########
@@ -67,6 +68,110 @@ public void testHasherBasedMergeWithDifferingSparseness() {
                 .forEachBitMapPair(bf1, (x, y) -> x == y));
     }
 
+    @Test
+    public void testEstimateNWithBrokenCardinality() {
+        // build a filter
+        BloomFilter filter1 = TestingHashers.populateEntireFilter(new 
BrokenCardinality(getTestShape()));
+        assertThrows(IllegalArgumentException.class, ()->filter1.estimateN());
+    }
+
+    @Test
+    public void testLargeBitmapAsArray() {
+        Shape s = Shape.fromKM(1, Integer.MAX_VALUE);
+        // create a very large filter with Integer.MAX_VALUE-1 bit set.
+        BloomFilter bf1 = new SimpleBloomFilter(s);
+        bf1.merge(new BitMapProducer() {
+            @Override
+            public boolean forEachBitMap(LongPredicate predicate) {
+                int limit = Integer.MAX_VALUE-1;

Review Comment:
   yes.  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