This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
PATCH: Work around compiler bug
- To: java-patches at sources dot redhat dot com
- Subject: PATCH: Work around compiler bug
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Thu, 02 Nov 2000 23:21:59 +1300
This patch comments out two lines of code which are causing problems for
gcj due to a static inner class related bug (see my recent follow up to
PR 297 for a test case)
Without this code is enabled, nested sublist iterators will not
correctly check for concurrent modifications.
regards
[ bryce ]
2000-11-02 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/AbstractList.java (remove): Comment out modCount increment
to work around compiler bug.
(add): Ditto.
Index: java/util/AbstractList.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/util/AbstractList.java,v
retrieving revision 1.3
diff -u -r1.3 AbstractList.java
--- AbstractList.java 2000/11/02 10:08:03 1.3
+++ AbstractList.java 2000/11/02 10:14:45
@@ -496,7 +496,8 @@
public void remove()
{
i.remove();
- SubList.this.modCount++;
+ // FIXME: Uncomment the following line once the compiler is fixed.
+ //SubList.this.modCount++;
size--;
position = nextIndex();
}
@@ -509,7 +510,8 @@
public void add(Object o)
{
i.add(o);
- SubList.this.modCount++;
+ // FIXME: Uncomment the following line once the compiler is fixed.
+ //SubList.this.modCount++;
size++;
position++;
}