[jdom-interest] Bug in Element.clone()
Dan Sojka
dan_sojka at centegy.com
Mon Dec 18 14:17:22 PST 2000
The clone() method of Element throws a null pointer exception if the
Element doesn't contain a Namespace (and additionalNamespaces is null).
The bug was found in the latest daily snapshot retrieved on 12/18/00 and
is in Element.clone() on line 1494. A null check should probably be
added.
Change :
...
// Handle additional namespaces
element.additionalNamespaces =
(LinkedList) additionalNamespaces.clone();
...
To :
...
// Handle additional namespaces
if (additionalNamespaces != null) {
element.additionalNamespaces =
(LinkedList) additionalNamespaces.clone();
}
...
More information about the jdom-interest
mailing list