This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: fix PR 27028, 24752 - Iterator and ConcurrentModificationException


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]