[jdom-interest] How to "crash" JDOM, part 1
David W. Smiley
dsmiley at mitre.org
Thu Aug 31 12:00:48 PDT 2000
trebor.a.rude at lmco.com wrote:
>
> The existing implementation of addContent() already checks if
> isRootElement is true, and won't allow the add if it is (unfortunately, adds
> via the PartialList check neither condition and may well be used to create
> all sorts of messed up trees, gotta make sure that gets fixed once we decide
> the extent of the fix needed), so it shouldn't be possible to add the root
> node as a child of any other Element in the tree. So again it looks like all
> that is needed is a quick check for self-reference to prevent loops. Any
> other cases?
isRootElement will be false if you have a tree that is not part of a
document. This happens when you create an element, clone one, or remove
one.
-- David Smiley
More information about the jdom-interest
mailing list