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.45 by jsr166, Fri Jun 10 16:00:03 2005 UTC vs.
Revision 1.46 by dl, Fri Jun 10 16:11:38 2005 UTC

# Line 756 | Line 756 | public class CopyOnWriteArrayList<E>
756       */
757      public boolean addAll(int index, Collection<? extends E> c) {
758          int numNew = c.size();
759        if (numNew == 0)
760            return false;
759          final ReentrantLock lock = this.lock;
760          lock.lock();
761          try {
# Line 766 | Line 764 | public class CopyOnWriteArrayList<E>
764              if (index > len || index < 0)
765                  throw new IndexOutOfBoundsException("Index: "+index+
766                                                      ", Size: "+len);
767 +            if (numNew == 0)
768 +                return false;
769              int numMoved = len - index;
770              Object[] newElements;
771              if (numMoved == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines