pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Piotrowski <rpiotrow...@azonic.net>
Subject Re: clearing all items from Component.UserDataDictionary
Date Fri, 12 Feb 2010 21:49:25 GMT
If I try to remove with the iterator, I get this:

java.lang.UnsupportedOperationException
        at org.apache.pivot.util.ImmutableIterator.remove(Unknown Source)



Thanks,
Bob

On Fri, Feb 12, 2010 at 3:24 PM, Robert Piotrowski
<rpiotrowski@azonic.net>wrote:

> I there a quick way to remove all items in Component.UserDataDictionary in
> one step?
>
> If I iterate with the iterator and use remove(), I get a concurrency
> exception.
>
> My workaround right now is by interating over the dictionary to get all
> keys into a vector and then looping thru the vector to remove elements by
> keyname back on the dictionary.  But it's nasty.
>
> Maybe it should implement the Map interface too/instead?
>
> Or is there a way to set it to an empty dictionary?  I can't see to get
> that to work.
>
>
>
>
> Thanks,
>
> Bob
>

Mime
View raw message