This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: fix PR 27028, 24752 - Iterator and ConcurrentModificationException
- From: Tom Tromey <tromey at redhat dot com>
- To: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- Cc: Classpath patch list <classpath-patches at gnu dot org>, Java Patches <java-patches at gcc dot gnu dot org>
- Date: 05 Apr 2006 13:28:33 -0600
- Subject: Re: FYI: fix PR 27028, 24752 - Iterator and ConcurrentModificationException
- References: <44340CC6.9010601@mckinlay.net.nz>
- Reply-to: tromey at redhat dot com
>>>>> "Bryce" == Bryce McKinlay <bryce@mckinlay.net.nz> writes:
Bryce> Although the spec states that it is invalid to perform any operation
Bryce> on an Iterator after its backing collection has been modified, in
Bryce> practice it is arguably redundant for these methods to do the check as
Bryce> they will typically be called in tandem with next(), etc, if their
Bryce> results are actually used.
I didn't look to find the right place, but it would be nice to have an
@specnote in the docs where the ConcurrentModificationException stuff
is mentioned, explaining that for compatibility we only throw it on
next() and not hasNext.
Tom