[jdom-interest] Maybe a bug report related to the 'detach' me

Jason Hunter jhunter at servlets.com
Thu Apr 11 03:34:22 PDT 2002

Ken Rune Helland wrote:
> > But Brett McLaughlin told me to use the "detach()" method
> > to remove an element from the tree.
> If you have a reference to an element you can remove it from the
> tree with .detach(). But unfortunatly this conflicts with the
> definition of the Iterator interface witch states an iterator
> shoud be invalidatet if the list is modified outside the iterator.
> If you want to use the Element.detach() rater than the Iterator.remove()
> use the ListIterator instead. If you get a error the it is a bug
> in the List/ListIterator implementation.

The list implementations as of beta8 are fully live and reflect the
document at the current time.  That's why this issue is becoming
apparent now while it wasn't in beta7.  I added an entry in the FAQ
about it recently.  Check it out: http://jdom.org/docs/faq.html.


More information about the jdom-interest mailing list