On Wed, Mar 18, 2009 at 2:57 PM, Vitali Lovich <[email protected]> wrote:

> First major concern is that I got a ConcurrentModificationException when
> iterating over a HashSet - this exception is completely meaningless in the
> context of the browser (no threading).  There's also not really any
> meaningful message in the stack trace:
>

It applies equally well to single-thread scenarios, see the JavaDoc:
http://java.sun.com/j2se/1.5.0/docs/api/java/util/ConcurrentModificationException.html


> somehow fixes the problem.  Is the compiler screwing up in converting the
> Java for-each notation into the iterator equivalent, or am I missing
> something?
>
> Some background:  this succeeds the first time it is called from within an
> event handler context (to notify the model to perform a login attempt).
> However, it fails the second time it is called when it is called from an
> AsyncCallback context (returning the result that it was a successful
> login).  However, at no point is the HashSet used modified (after startup
> where it contains currently 1 element).
>

It's possible there's a bug, but perhaps you should try wrapping things in
Collections.unmodifableSet()/Map() to make sure it's not being modified in
some way.

-Ray

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to