From 6234fa132f98db2530372b8d6457dfa1d18eed99 Mon Sep 17 00:00:00 2001 From: XenoAmess Date: Wed, 26 Aug 2020 14:21:15 +0800 Subject: [PATCH] Fix animal sniffer, Travis CI, and javadocs issues --- .travis.yml | 6 +++--- .../commons/collections4/iterators/ListIteratorWrapper.java | 2 +- .../bloomfilter/hasher/DynamicHasherBuilderTest.java | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3e1cabc8..41d35442f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,10 @@ jdk: - openjdk-ea script: - - mvn -V --no-transfer-progress + - mvn -V # japicmp requires a package - - mvn -V jar:jar japicmp:cmp -P japicmp --no-transfer-progress + - mvn -V jar:jar japicmp:cmp -P japicmp after_success: # jacoco will run in the main script. Include the profile to submit to coveralls. - - mvn -V jacoco:report coveralls:report -Ptravis-jacoco --no-transfer-progress + - mvn -V jacoco:report coveralls:report -Ptravis-jacoco diff --git a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java index 7784dfbfd..c25139239 100644 --- a/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java +++ b/src/main/java/org/apache/commons/collections4/iterators/ListIteratorWrapper.java @@ -204,7 +204,7 @@ public class ListIteratorWrapper implements ResettableListIterator { /** * Removes the last element that was returned by {@link #next()} or {@link #previous()} from the underlying collection. - * This call can only be made once per call to {@code next} or {@code previous} and only if {@link #add()} was not called in between. + * This call can only be made once per call to {@code next} or {@code previous} and only if {@link #add(Object)} was not called in between. * * @throws IllegalStateException if {@code next} or {@code previous} have not been called before, or if {@code remove} or {@code add} have been called after the last call to {@code next} or {@code previous} */ diff --git a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java index 4f14bea4b..1f2c1e2ad 100644 --- a/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java +++ b/src/test/java/org/apache/commons/collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java @@ -46,7 +46,7 @@ public class DynamicHasherBuilderTest { public void buildTest_byteArray() { final byte[] bytes = testString.getBytes(); final DynamicHasher hasher = builder.with(bytes).build(); - final int expected = (int) Math.floorMod(hf.apply(bytes, 0), shape.getNumberOfBits()); + final int expected = (int) Math.floorMod((long) hf.apply(bytes, 0), (long) shape.getNumberOfBits()); final OfInt iter = hasher.iterator(shape); @@ -80,7 +80,7 @@ public class DynamicHasherBuilderTest { public void buildTest_String() { final byte[] bytes = testString.getBytes(StandardCharsets.UTF_8); final DynamicHasher hasher = builder.with(testString, StandardCharsets.UTF_8).build(); - final int expected = (int) Math.floorMod(hf.apply(bytes, 0), shape.getNumberOfBits()); + final int expected = (int) Math.floorMod((long) hf.apply(bytes, 0), (long) shape.getNumberOfBits()); final OfInt iter = hasher.iterator(shape); @@ -96,7 +96,7 @@ public class DynamicHasherBuilderTest { public void buildTest_UnencodedString() { final byte[] bytes = testString.getBytes(StandardCharsets.UTF_16LE); final DynamicHasher hasher = builder.withUnencoded(testString).build(); - final int expected = (int) Math.floorMod(hf.apply(bytes, 0), shape.getNumberOfBits()); + final int expected = (int) Math.floorMod((long) hf.apply(bytes, 0), (long) shape.getNumberOfBits()); final OfInt iter = hasher.iterator(shape);