[jdom-interest] How to "crash" JDOM, part 1

trebor.a.rude at lmco.com trebor.a.rude at lmco.com
Thu Aug 31 10:19:11 PDT 2000


	I agree it would make sense to have a way to turn it off, but where
do you put the option, since any Element (and the PartialList) might need to
access it? The Document might make sense, but Elements don't have a pointer
to the Document they're in (at the moment, I know there's been discussion of
it for the XPath stuff). Of course, adding one raises the problem of
maintaining the pointer, and how much attention to pay to it (we don't
necessarily have to care about the source docuement when adding one Element
to another, for example). I'll try to have the patch available this weekend,
with or without the option to shut it off.  That can always be added later.

> -----Original Message-----
> From:	Jason Hunter [SMTP:jhunter at collab.net]
> Sent:	Thursday, August 31, 2000 9:48 AM
> To:	trebor.a.rude at lmco.com
> Cc:	aleksi.kallio at infomates.net; jdom-interest at jdom.org
> Subject:	Re: [jdom-interest] How to "crash" JDOM, part 1
> 
> > the parent of the Element returned by clone() is set to null, 
> > which allowed the "bar.addContent(bar)" statement to work. 
> 
> Ah, right!
> 
> > What are your thoughts on adding the loop prevention code?  
> 
> I lean toward adding it because it's not that much a hit, but it really
> makes me think we should have a way to turn off sanity checking for
> performance critical uses of JDOM.  (Just like XML has the ability to
> turn off verification!)
> 
> > I'd be happy to do the work.
> 
> Cool.  The strategy as you saw was explained earlier in this thread.
> 
> -jh-
> 



More information about the jdom-interest mailing list