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

Aleksi Kallio aleksi.kallio at infomates.net
Wed Aug 16 22:23:46 PDT 2000

This little bit of software makes JDOM (or XMLOutputter, to be precise) to enter an infite loop (built against a week old CVS). The code is of course a result of an evil mistake, but anyway, shouldn't the behaviour be better defined? 

  Element element = new Element("looped");
  Element copy = element.getCopy("copy");
  copy.addContent(copy); // bang!
  new XMLOutputter().output(new Document(copy), System.out);

More information about the jdom-interest mailing list