Bugs item #2941594, was opened at 2010-01-28 14:42
Message generated for change (Tracker Item Submitted) made by dvelten
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=2941594&group_id=16035

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Velten (dvelten)
Assigned to: Nobody/Anonymous (nobody)
Summary: [dom4j 2.0.0 ALPHA 1] DefaultElement.clone() clears Attribut

Initial Comment:
In Version 2.0.0 ALPHA 1 is a bug in class org.dom4j.tree.DefaultElement 
clone() Method. After clone Attributes-List and content-List in the Original 
and the cloned Element are removed. In the Sourcecode you make first a clone 
from the original Element. Identical instance of content-List and 
attributes-List are now on the copy. Then you clear it. So you have removed 
attributes and content from original and from copy.

answer.content.clear();
answer.attributes.clear();

In the old dom4j Sourcecode Version 1.6.1 they are set to null:

answer.content = null;


answer.attributes = null;


This seems to be right in the new version 2.0 too.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=2941594&group_id=16035

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to