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

Comparing jsr166/src/main/java/util/ArrayList.java (file contents):
Revision 1.11 by jsr166, Mon Nov 28 03:59:23 2005 UTC vs.
Revision 1.12 by jsr166, Mon Nov 28 04:06:29 2005 UTC

# Line 602 | Line 602 | public class ArrayList<E> extends Abstra
602          for (int i=0; i<size; i++)
603              s.writeObject(elementData[i]);
604  
605 <        if (modCount != expectedModCount) {
605 >        if (expectedModCount != modCount) {
606              throw new ConcurrentModificationException();
607          }
608  
# Line 725 | Line 725 | public class ArrayList<E> extends Abstra
725              } catch (IndexOutOfBoundsException ex) {
726                  throw new NoSuchElementException();
727              } finally {
728 <                if (modCount != expectedModCount)
728 >                if (expectedModCount != modCount)
729                      throw new ConcurrentModificationException();
730              }
731          }
# Line 733 | Line 733 | public class ArrayList<E> extends Abstra
733          public void remove() {
734              if (lastRet < 0)
735                  throw new IllegalStateException();
736 <            if (modCount != expectedModCount)
736 >            if (expectedModCount != modCount)
737                  throw new ConcurrentModificationException();
738              ArrayList.this.remove(lastRet);
739              if (lastRet < cursor)
# Line 745 | Line 745 | public class ArrayList<E> extends Abstra
745          public void set(E e) {
746              if (lastRet < 0)
747                  throw new IllegalStateException();
748 <            if (modCount != expectedModCount)
748 >            if (expectedModCount != modCount)
749                  throw new ConcurrentModificationException();
750              ArrayList.this.set(lastRet, e);
751              expectedModCount = modCount;
752          }
753  
754          public void add(E e) {
755 <            if (modCount != expectedModCount)
755 >            if (expectedModCount != modCount)
756                  throw new ConcurrentModificationException();
757              ArrayList.this.add(cursor++, e);
758              lastRet = -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines