bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/24632] java.util.HashMap$HashIterator.hasNext throws Conc


From: gnuclasspath dot 10 dot bertnase at spamgourmet dot com
Subject: [Bug classpath/24632] java.util.HashMap$HashIterator.hasNext throws ConcurrentModificationException
Date: 2 Nov 2005 11:28:42 -0000


------- Comment #2 from gnuclasspath dot 10 dot bertnase at spamgourmet dot com 
 2005-11-02 11:28 -------
Hi Mark,
Thanks for the fast respose.
(In reply to comment #1)
> In GNU Classpath we make all Iterators fail-fast whenever possible, so using
> the Iterator after changing the backing collection throws a
> ConcurrentModificationException. This has found some real bugs in real
> applications that weren't detected by other collections implementations, so I
> would not recommend changing this behavour in GNU Classpath.

But this is not even stated in the java.util.Iterator javadoc.. and as said
before it could break existing code which runs fine on Sun - and this code
could in worst case be an obfuscated closed-source library, so this lib cannot
run on Gnu classpath while working fine on Sun. 

Just wanted to point out again that this is inconsistent with Sun's classlib
behaviour, though I understand your intent in making the Iterators fail-fast. 

Greetings

Thomas


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24632





reply via email to

[Prev in Thread] Current Thread [Next in Thread]