[Bug classpath/27028] Iterator.hasNext() throws ConcurrentModificationException
mckinlay at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 5 15:19:00 GMT 2006
------- 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
More information about the Java-prs
mailing list