No no, I mean that even if you're not modifying the map you can get a
concurrent modification exception by accessing the map via OGNL's []
notation, just in an tag.
Dave
--- Eduardo Dela Rosa <[EMAIL PROTECTED]> wrote:
> You are right there. And I guess the best way to rid this exception then i
; To: Struts Users Mailing List
> Subject: Re: java.util.ConcurrentModificationException at IteratorComponent
>
> You are right there. And I guess the best way to rid this exception then is
> to have the code part in synchronized block, i.e., synchronizing on the list
> object itself +
You are right there. And I guess the best way to rid this exception then is
to have the code part in synchronized block, i.e., synchronizing on the list
object itself + get the iterator + invoke either "add" or "remove" inside
the block. This will hurt the performance a bit BUT will preserve the
in
--- Eduardo Dela Rosa <[EMAIL PROTECTED]> wrote:
> Also, you must be removing or updating object directly inside your list
> object which is why you're getting this error. Try to get a reference to
> Iterator from your ArrayList object and invoke "remove" or "add" methods
> via the Iterator to get
You stick to your code. However, update your code part such that when
create your ArrayList, do it as Collections.synchronizedList(new
ArrayList(...)).
Also, you must be removing or updating object directly inside your list
object which is why you're getting this error. Try to get a reference to
--- Othon Reyes Sanchez <[EMAIL PROTECTED]> wrote:
> do you know a collection that is thread safe?
Look in the JavaDocs: not only are there thread-safe collections but there
are utility methods to create them from non-thread-safe collections.
As I said in your JIRA post you should post the action
do you know a collection that is thread safe?
On Tue, Feb 26, 2008 at 12:42 PM, Randy Burgess <[EMAIL PROTECTED]> wrote:
> I believe this exception occurs when you try and modify an ArrayList while
> iterating over said list. ArrayList is not thread safe.
>
> Regards,
> Randy Burgess
> Sr. Web A
I believe this exception occurs when you try and modify an ArrayList while
iterating over said list. ArrayList is not thread safe.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Othon Reyes Sanchez <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List
>
8 matches
Mail list logo