This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug classpath/27028] Iterator.hasNext() throws ConcurrentModificationException
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 5 Apr 2006 15:19:38 -0000
- Subject: [Bug classpath/27028] Iterator.hasNext() throws ConcurrentModificationException
- References: <bug-27028-9773@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from mckinlay at redhat dot com 2006-04-05 15:19 -------
(In reply to comment #4)
> I would argue that Sun's implementation is correct in this case in the
> sense that hasNext() doesn't actually modify anything, only next() does.
Yeah, I agree - although you might get a bogus answer for hasNext(), 99% of the
time, the application is about to call next(), so they'll get the exception
there anyway. Changing this also gives a slight performance improvement for
iterators.
This bug seems to be coming up pretty regularly. I'm working on a patch and
test case for it.
--
mckinlay at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mckinlay at redhat dot com |unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27028