--- jsr166/src/main/java/util/ArrayList.java 2018/05/05 18:29:53 1.58 +++ jsr166/src/main/java/util/ArrayList.java 2018/05/06 01:14:25 1.59 @@ -1598,11 +1598,11 @@ public class ArrayList extends Abstra replaceAllRange(operator, 0, size); } - private void replaceAllRange(UnaryOperator operator, int from, int to) { + private void replaceAllRange(UnaryOperator operator, int i, int end) { Objects.requireNonNull(operator); final int expectedModCount = modCount; final Object[] es = elementData; - for (int i = from; modCount == expectedModCount && i < to; i++) + for (; modCount == expectedModCount && i < end; i++) es[i] = operator.apply(elementAt(es, i)); if (modCount != expectedModCount) throw new ConcurrentModificationException();