--- jsr166/src/main/java/util/ArrayList.java 2005/11/28 03:59:23 1.11 +++ jsr166/src/main/java/util/ArrayList.java 2005/11/28 04:06:29 1.12 @@ -602,7 +602,7 @@ public class ArrayList extends Abstra for (int i=0; i extends Abstra } catch (IndexOutOfBoundsException ex) { throw new NoSuchElementException(); } finally { - if (modCount != expectedModCount) + if (expectedModCount != modCount) throw new ConcurrentModificationException(); } } @@ -733,7 +733,7 @@ public class ArrayList extends Abstra public void remove() { if (lastRet < 0) throw new IllegalStateException(); - if (modCount != expectedModCount) + if (expectedModCount != modCount) throw new ConcurrentModificationException(); ArrayList.this.remove(lastRet); if (lastRet < cursor) @@ -745,14 +745,14 @@ public class ArrayList extends Abstra public void set(E e) { if (lastRet < 0) throw new IllegalStateException(); - if (modCount != expectedModCount) + if (expectedModCount != modCount) throw new ConcurrentModificationException(); ArrayList.this.set(lastRet, e); expectedModCount = modCount; } public void add(E e) { - if (modCount != expectedModCount) + if (expectedModCount != modCount) throw new ConcurrentModificationException(); ArrayList.this.add(cursor++, e); lastRet = -1;