Fix FindBugs issues

This commit is contained in:
Bruno P. Kinoshita 2017-09-13 00:43:25 +12:00
parent 49a5c0a4ee
commit 55e8eac25d
2 changed files with 1 additions and 4 deletions

View File

@ -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");
}

View File

@ -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;