ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/CopyOnWriteArrayList.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/CopyOnWriteArrayList.java (file contents):
Revision 1.108 by dl, Fri May 10 11:40:10 2013 UTC vs.
Revision 1.109 by jsr166, Sun Jul 14 22:29:33 2013 UTC

# Line 1077 | Line 1077 | public class CopyOnWriteArrayList<E>
1077      public ListIterator<E> listIterator(final int index) {
1078          Object[] elements = getArray();
1079          int len = elements.length;
1080 <        if (index<0 || index>len)
1080 >        if (index < 0 || index > len)
1081              throw new IndexOutOfBoundsException("Index: "+index);
1082  
1083          return new COWIterator<E>(elements, index);
# Line 1227 | Line 1227 | public class CopyOnWriteArrayList<E>
1227  
1228          // only call this holding l's lock
1229          private void rangeCheck(int index) {
1230 <            if (index<0 || index>=size)
1230 >            if (index < 0 || index >= size)
1231                  throw new IndexOutOfBoundsException("Index: "+index+
1232                                                      ",Size: "+size);
1233          }
# Line 1274 | Line 1274 | public class CopyOnWriteArrayList<E>
1274              lock.lock();
1275              try {
1276                  checkForComodification();
1277 <                if (index<0 || index>size)
1277 >                if (index < 0 || index > size)
1278                      throw new IndexOutOfBoundsException();
1279                  l.add(index+offset, element);
1280                  expectedArray = l.getArray();
# Line 1336 | Line 1336 | public class CopyOnWriteArrayList<E>
1336              lock.lock();
1337              try {
1338                  checkForComodification();
1339 <                if (index<0 || index>size)
1339 >                if (index < 0 || index > size)
1340                      throw new IndexOutOfBoundsException("Index: "+index+
1341                                                          ", Size: "+size);
1342                  return new COWSubListIterator<E>(l, index, offset, size);
# Line 1350 | Line 1350 | public class CopyOnWriteArrayList<E>
1350              lock.lock();
1351              try {
1352                  checkForComodification();
1353 <                if (fromIndex<0 || toIndex>size)
1353 >                if (fromIndex < 0 || toIndex > size)
1354                      throw new IndexOutOfBoundsException();
1355                  return new COWSubList<E>(l, fromIndex + offset,
1356                                           toIndex + offset);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines