You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2020/08/28 09:29:18 UTC

[commons-collections] branch master updated: Fix animal sniffer, Travis CI, and javadocs issues

This is an automated email from the ASF dual-hosted git repository.

kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


The following commit(s) were added to refs/heads/master by this push:
     new 6234fa1  Fix animal sniffer, Travis CI, and javadocs issues
     new 679d515  Merge branch 'pr-178'
6234fa1 is described below

commit 6234fa132f98db2530372b8d6457dfa1d18eed99
Author: XenoAmess <xe...@gmail.com>
AuthorDate: Wed Aug 26 14:21:15 2020 +0800

    Fix animal sniffer, Travis CI, and javadocs issues
---
 .travis.yml                                                         | 6 +++---
 .../apache/commons/collections4/iterators/ListIteratorWrapper.java  | 2 +-
 .../collections4/bloomfilter/hasher/DynamicHasherBuilderTest.java   | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b3e1cab..41d3544 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 7784dfb..c251392 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<E> implements ResettableListIterator<E> {
 
     /**
      * 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 4f14bea..1f2c1e2 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);