[From nobody Fri Aug 6 17:05:26 2004 X-Mozilla-Status2: 00000000 Message-ID: <3A3E91FE.830566F7@collab.net> Date: Mon, 18 Dec 2000 14:38:54 -0800 From: Jason Hunter <jhunter@collab.net> X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Dan Sojka <dan_sojka@centegy.com> CC: jdom-interest@jdom.org Subject: Re: [jdom-interest] Bug in Element.clone() References: <3A3E8CF2.3AA75CA6@centegy.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks, I just checked in the null check fix. (Thanks doubly for trying the latest, stating that you had, and diagnosing exactly what was wrong!) -jh- Dan Sojka wrote: > > 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(); > } > ... > > _______________________________________________ > To control your jdom-interest membership: > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com ]