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 a9ca13325..00e8a6231 100644 --- a/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java +++ b/src/main/java/org/apache/commons/collections4/bloomfilter/CountingBloomFilter.java @@ -147,7 +147,7 @@ public interface CountingBloomFilter extends BloomFilter, CellExtractor { * @see #getMaxInsert(CellExtractor) */ default int getMaxInsert(final IndexExtractor indexExtractor) { - return getMaxInsert(CellExtractor.from(indexExtractor.uniqueIndices()) ); + return getMaxInsert(CellExtractor.from(indexExtractor.uniqueIndices())); } /** diff --git a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java index c0f7bfd4d..94fc2f2ae 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ArrayIterator.java @@ -105,18 +105,12 @@ public class ArrayIterator implements ResettableIterator { * @param type the index type (for error messages) * @throws IndexOutOfBoundsException if the index is invalid */ - protected void checkBound(final int bound, final int len, final String type ) { + protected void checkBound(final int bound, final int len, final String type) { if (bound > len) { - throw new ArrayIndexOutOfBoundsException( - "Attempt to make an ArrayIterator that " + type + - "s beyond the end of the array. " - ); + throw new ArrayIndexOutOfBoundsException("Attempt to make an ArrayIterator that " + type + "s beyond the end of the array. "); } if (bound < 0) { - throw new ArrayIndexOutOfBoundsException( - "Attempt to make an ArrayIterator that " + type + - "s before the start of the array. " - ); + throw new ArrayIndexOutOfBoundsException("Attempt to make an ArrayIterator that " + type + "s before the start of the array. "); } } diff --git a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java index f79c46f73..34a1822ad 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java +++ b/src/main/java/org/apache/commons/collections4/iterators/FilterListIterator.java @@ -81,7 +81,7 @@ public class FilterListIterator implements ListIterator { * * @param iterator the iterator to use */ - public FilterListIterator(final ListIterator iterator ) { + public FilterListIterator(final ListIterator iterator) { this.iterator = iterator; } 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 93a39c4d6..942fc4aa5 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/AbstractCountingBloomFilterTest.java @@ -342,8 +342,8 @@ public abstract class AbstractCountingBloomFilterTest bf7.remove(bmp2)); - assertThrows(IllegalArgumentException.class, () -> bf7.remove( new BadHasher(-1))); - assertThrows(IllegalArgumentException.class, () -> bf7.remove( new BadHasher(getTestShape().getNumberOfBits()))); + assertThrows(IllegalArgumentException.class, () -> bf7.remove(new BadHasher(-1))); + assertThrows(IllegalArgumentException.class, () -> bf7.remove(new BadHasher(getTestShape().getNumberOfBits()))); } /** @@ -358,7 +358,7 @@ public abstract class AbstractCountingBloomFilterTest bf3.remove( new BadHasher(-1))); - assertThrows(IllegalArgumentException.class, () -> bf3.remove( new BadHasher(getTestShape().getNumberOfBits()))); + assertThrows(IllegalArgumentException.class, () -> bf3.remove(new BadHasher(-1))); + assertThrows(IllegalArgumentException.class, () -> bf3.remove(new BadHasher(getTestShape().getNumberOfBits()))); } private void verifyMaxInsert(final CountingBloomFilter bf, final int from1, final int from11) { diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java index 5711360ce..01717a0d1 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/DefaultCellExtractorTest.java @@ -31,7 +31,7 @@ public class DefaultCellExtractorTest extends AbstractCellExtractorTest { protected CellExtractor createExtractor() { return consumer -> { for (int i = 0; i < indices.length; i++) { - if (!consumer.test(indices[i], values[i] )) { + if (!consumer.test(indices[i], values[i])) { return false; } } diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java index d6da94f5b..270e139d5 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/LayeredBloomFilterTest.java @@ -233,8 +233,8 @@ public class LayeredBloomFilterTest extends AbstractBloomFilterTest new NumberedBloomFilter(getTestShape(), 3, sequence[0]++)) .setExtendCheck(ExtendCheck.neverAdvance()) - .setCleanup(ll -> ll.removeIf( f -> (((NumberedBloomFilter) f).value-- == 0))).get(); - final LayeredBloomFilter underTest = new LayeredBloomFilter(getTestShape(), layerManager ); + .setCleanup(ll -> ll.removeIf(f -> (((NumberedBloomFilter) f).value-- == 0))).get(); + final LayeredBloomFilter underTest = new LayeredBloomFilter(getTestShape(), layerManager); assertEquals(1, underTest.getDepth()); underTest.merge(TestingHashers.randomHasher()); underTest.cleanup(); // first count == 2 diff --git a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java index e36ae44a6..8a638bbbf 100644 --- a/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java +++ b/src/test/java/org/apache/commons/collections4/splitmap/TransformedSplitMapTest.java @@ -55,7 +55,7 @@ public class TransformedSplitMapTest extends BulkTest { final TransformedSplitMap map = TransformedSplitMap.transformingMap(new HashMap<>(), NOPTransformer.nopTransformer(), - NOPTransformer.nopTransformer() ); + NOPTransformer.nopTransformer()); final ObjectInputStream in = new ObjectInputStream(new FileInputStream(TEST_DATA_PATH + "/TransformedSplitMap.emptyCollection.version4.obj")); final Object readObject = in.readObject();