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.9 by tim, Wed Aug 6 18:22:09 2003 UTC vs.
Revision 1.10 by tim, Fri Aug 8 20:05:07 2003 UTC

# Line 447 | Line 447 | public class CopyOnWriteArrayList<E>
447                  for (int k = i + 1; k < len; ++k) newArray[k-1] = array_[k];
448                  array_ = newArray;
449                  return true;
450 <            }
451 <            else
450 >            } else
451                  newArray[i] = array_[i];
452          }
453          // special handling for last cell
# Line 457 | Line 456 | public class CopyOnWriteArrayList<E>
456          (element != null && element.equals(array_[newlen]))) {
457              array_ = newArray;
458              return true;
459 <        }
461 <        else
459 >        } else
460              return false; // throw away copy
461  
462      }
# Line 910 | Line 908 | public class CopyOnWriteArrayList<E>
908          public E next() {
909              try {
910                  return array[cursor++];
911 <            }
914 <            catch (IndexOutOfBoundsException ex) {
911 >            } catch (IndexOutOfBoundsException ex) {
912                  throw new NoSuchElementException();
913              }
914          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines