# | Line 1371 | Line 1371 | public class CopyOnWriteArrayList<E> | |
---|---|---|
1371 | lock.lock(); | |
1372 | try { | |
1373 | checkForComodification(); | |
1374 | < | if (fromIndex < 0 || toIndex > size) |
1374 | > | if (fromIndex < 0 || toIndex > size || fromIndex > toIndex) |
1375 | throw new IndexOutOfBoundsException(); | |
1376 | return new COWSubList<E>(l, fromIndex + offset, | |
1377 | toIndex + offset); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |