[jdom-interest] Problem with the clone method in Document (latest
jhunter at collab.net
Wed Aug 23 19:07:35 PDT 2000
Richard McAneny wrote:
> I have found a problem with the clone method in Document with the tip
> version (and prior) of JDOM: In the clone method the root element is
> being added twice.
Good bug find. I fixed it in CVS.
> Here is my sample code to see this happen.
> Element docRoot = new Element("test");
> Element child = new Element("child1");
> Document document = new Document(docRoot);
> Document document2 = (Document) document.clone();
> throws the following exception:
Just ran the code and no exception. :-)
More information about the jdom-interest