src/share/classes/java/util/concurrent/CopyOnWriteArrayList.java
Print this page
*** 545,555 ****
* (If <tt>toIndex==fromIndex</tt>, this operation has no effect.)
*
* @param fromIndex index of first element to be removed
* @param toIndex index after last element to be removed
* @throws IndexOutOfBoundsException if fromIndex or toIndex out of range
! * (@code{fromIndex < 0 || toIndex > size() || toIndex < fromIndex})
*/
private void removeRange(int fromIndex, int toIndex) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
--- 545,555 ----
* (If <tt>toIndex==fromIndex</tt>, this operation has no effect.)
*
* @param fromIndex index of first element to be removed
* @param toIndex index after last element to be removed
* @throws IndexOutOfBoundsException if fromIndex or toIndex out of range
! * ({@code{fromIndex < 0 || toIndex > size() || toIndex < fromIndex})
*/
private void removeRange(int fromIndex, int toIndex) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
*** 987,997 ****
return new COWIterator<E>(elements, index);
}
private static class COWIterator<E> implements ListIterator<E> {
! /** Snapshot of the array **/
private final Object[] snapshot;
/** Index of element to be returned by subsequent call to next. */
private int cursor;
private COWIterator(Object[] elements, int initialCursor) {
--- 987,997 ----
return new COWIterator<E>(elements, index);
}
private static class COWIterator<E> implements ListIterator<E> {
! /** Snapshot of the array */
private final Object[] snapshot;
/** Index of element to be returned by subsequent call to next. */
private int cursor;
private COWIterator(Object[] elements, int initialCursor) {