<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>I am in the middle of an upgrade from beta 7 to beta 8, and a
junit test I have seems to have identified a bug in the current release (beta
8). Currently you can create multiple Documents with the same Element at
the root simulataneously. No IllegalAddException is being thrown in the
case that the Element is already a root element. I did not see any
documentation changes to imply that this was an intended change.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>In beta 7, the Document.setRootElement(Element) method checks
the Element passed into the method for any parent (through Element.getParent())
and for being a root element of another Document (through
Element.isRootElement()).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>In beta 8, the Document.setRootElement(Element) method does no
checks on the Element passed into the method. Instead, the check is now
done later in the ContentList.add(int, Element) method. BUT, it only
checks for a parent (through getParent()).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I have not had a chance to test the very latest CVS snapshot,
but I reviewed the relevant code and didn't see any changes from the beta 8 code
that would fix this problem.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I have only done a quick check into this problem, so I may
have missed something, or it may have already been fixed. But the problem
definitely exists in the beta 8 version available for download.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I have worked around this problem, as we wrap JDOM in our
application, but I thought I make sure that if this bug has not been fixed that
it gets identified ASAP.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks.</FONT></DIV>
<DIV><FONT size=2>Doug Newton</FONT></DIV>
<DIV><FONT size=2>dnewton@tech-partners.com</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></FONT></DIV></BODY></HTML>