NullPointerException in Element.setAttribute(final String name, final String value, final Namespace ns)
<[email protected]> Fri, 6 Apr 2012 20:43:17 +0300
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <6A01160BED1CB74CB2F447CB21ED5C110119B039EA32@INT03EXVS3.mcint.local> |
I just upgraded from jdom 1.0 to jdom 1.1.3 and I was setting an attribute where the namespace was NULL. The old code was different, it was NOT calling get(...), so it was setting the namespace to namespace.NO_NAMESPACE when the namespace was NULL, before calling this get(...) but the new code, when it calls getAttribute(name, ns) (first line of method described) is getting a null pointer on the namespace. Probably the namespace needs to be set to NO_NAMESPACE before calling get(..) when it is NULL. Gisella Saavedra Framework Team [email protected]<mailto:[email protected]> [cid:[email protected]] 1000 Broadway, Suite 150, Oakland, CA 94607 | T+1 510 267 5123 T Main+1 510 267 5000 F+1 510 267 5100 | http://www.navis.com<http://www.navis.com/> _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]
image001.gif
(image/gif, 185 B) - not displayed