diff --git a/src/conf/checkstyle.orig b/src/conf/checkstyle.orig new file mode 100644 index 0000000000..0b79c22dca --- /dev/null +++ b/src/conf/checkstyle.orig @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/conf/checkstyle2.xml b/src/conf/checkstyle2.xml new file mode 100644 index 0000000000..50ac405205 --- /dev/null +++ b/src/conf/checkstyle2.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java index a0871bac3c..f7c6f6dbd5 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/ArrayCountingBloomFilter.java @@ -111,9 +111,10 @@ public void clear() { } @Override - public int maxValue() { + public int getMaxValue() { return Integer.MAX_VALUE; } + @Override public ArrayCountingBloomFilter copy() { return new ArrayCountingBloomFilter(this); diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java index 1a0400797a..93df09bd2e 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java @@ -78,10 +78,10 @@ public interface CountingBloomFilter extends BloomFilter, BitCountProducer { boolean isValid(); /** - * Returns maximum value for a cell in this Counting filter can hold. - * @return the maximum value for a cell in this Counting filter can hold. + * Returns maximum value for a cell in this Counting filter. + * @return the maximum value for a cell in this Counting filter. */ - int maxValue(); + int getMaxValue(); // Modification Operations diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java index 3c0064a8e6..8874421c84 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java @@ -132,7 +132,7 @@ public final void testCountingSpecificMerge() { // test overflow final CountingBloomFilter bf5 = createEmptyFilter(getTestShape()); - assertTrue(bf5.add(getMaximumValueProducer(bf5.maxValue())), "Should add to empty"); + assertTrue(bf5.add(getMaximumValueProducer(bf5.getMaxValue())), "Should add to empty"); assertTrue(bf5.isValid(), "Should be valid"); final CountingBloomFilter bf6 = bf5.copy(); @@ -157,7 +157,7 @@ public void testAdd() { // test overflow final CountingBloomFilter bf2 = createEmptyFilter(getTestShape()); - assertTrue(bf2.add(getMaximumValueProducer(bf2.maxValue())), "Should add to empty"); + assertTrue(bf2.add(getMaximumValueProducer(bf2.getMaxValue())), "Should add to empty"); assertTrue(bf2.isValid(), "Should be valid"); assertFalse(bf2.add(createFilter(getTestShape(), TestingHashers.FROM1)), "Should not add");