[Kaffe] I am getting a ConcurrentModificationException
archie at whistle.com
Thu Sep 23 09:14:35 PDT 1999
Moses DeJong writes:
> I just downloaded the Kaffe CVS from today (Thu Sep 23), and I noticed
> that I got a new exception from the Hashtable code. My code works just
> fine on other JVM's, but it bombs out under the new Kaffe build. I know
> this code worked with Kaffe last week so it must be a new problem. Has
> anyone else run into this?
I replaced kaffe's Hashtable implementation with one implemented
in terms of HashMap, which explains the change. You are seeing
"fail-fast" behavior. This is a bug which I'll fix.. the keys()
and elements() methods are not supposed to be fail-fast:
(there's a typo in the last sentence: "values" should be "elements").
However, this exception indicates that your program potentially
has a bug.. it's trying to iterate through the elements while
changing the contents of the Hashtable at the same time.
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe