Repository: commons-collections Updated Branches: refs/heads/master 49a5c0a4e -> 9ae946c7d
Fix FindBugs issues Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/55e8eac2 Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/55e8eac2 Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/55e8eac2 Branch: refs/heads/master Commit: 55e8eac25d81f07bebb16d812c97edaf1393083f Parents: 49a5c0a Author: Bruno P. Kinoshita <brunodepau...@yahoo.com.br> Authored: Wed Sep 13 00:43:25 2017 +1200 Committer: Bruno P. Kinoshita <brunodepau...@yahoo.com.br> Committed: Wed Sep 13 00:43:25 2017 +1200 ---------------------------------------------------------------------- src/main/java/org/apache/commons/collections4/ListUtils.java | 3 --- src/main/java/org/apache/commons/collections4/list/TreeList.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/55e8eac2/src/main/java/org/apache/commons/collections4/ListUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/ListUtils.java b/src/main/java/org/apache/commons/collections4/ListUtils.java index c81ca11..38e2e8b 100644 --- a/src/main/java/org/apache/commons/collections4/ListUtils.java +++ b/src/main/java/org/apache/commons/collections4/ListUtils.java @@ -673,9 +673,6 @@ public class ListUtils { @Override public List<T> get(final int index) { final int listSize = size(); - if (listSize < 0) { - throw new IllegalArgumentException("negative size: " + listSize); - } if (index < 0) { throw new IndexOutOfBoundsException("Index " + index + " must not be negative"); } http://git-wip-us.apache.org/repos/asf/commons-collections/blob/55e8eac2/src/main/java/org/apache/commons/collections4/list/TreeList.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/list/TreeList.java b/src/main/java/org/apache/commons/collections4/list/TreeList.java index feffa1c..f8a52f4 100644 --- a/src/main/java/org/apache/commons/collections4/list/TreeList.java +++ b/src/main/java/org/apache/commons/collections4/list/TreeList.java @@ -622,7 +622,7 @@ public class TreeList<E> extends AbstractList<E> { } if (getRightSubTree() == null) { if (relativePosition > 0) { - left.relativePosition += relativePosition + (relativePosition > 0 ? 0 : 1); + left.relativePosition += relativePosition; } left.max().setRight(null, right); return left;