[jdom-interest] avoiding java.util.ConcurrentModificationException

Bradley S. Huffman hip at a.cs.okstate.edu
Sun Dec 12 06:57:10 PST 2004


Are you using the remove() method on the iterator, or list? Use the iterator.

Brad

"awais hamid" writes:

> 
> i have a  List which contains JDOM elements .Also i have an iterator on the 
> list .
> when the iterator reaches a special element i want to delete that element 
> but i am getting
> java.util.ConcurrentModificationException  exception. how to avoid this 
> exception
> 
> 
> -----------------------------------------------------------------------------
> ---
> May Allah give us an eye to see Truth as Truth & strength to follow it & may 
> He give us an eye to see Falsehood as Falsehood & strength to refrain from 
> it.
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com


More information about the jdom-interest mailing list