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: mark at gcc dot gnu dot org
Subject: [Bug classpath/24632] java.util.HashMap$HashIterator.hasNext throws ConcurrentModificationException
Date: 2 Nov 2005 10:59:37 -0000


------- Comment #1 from mark at gcc dot gnu dot org  2005-11-02 10:59 -------
Hi Dims,

Since this concerns Axis code I was wondering what your opinion is on this bug
report. It does look like a bug in the Axis code since after you call
remove(randomObject) on the backing collection of the (KeySet) Iterator the
call to it.hasNext() is undeterministic at the least.

Whether or not we classify this as a bug in GNU Classpath it seems like a good
idea to do as the reporter says and switch the conditions of the while
statement to read 'while (findReturnParam && it.hasNext())' in this piece of
code.

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.


-- 

mark at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at gcc dot gnu dot org,
                   |                            |dims at yahoo dot com
             Status|UNCONFIRMED                 |WAITING


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





reply via email to

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