setAttribute(String,String,Namespace) - NPE with null Namespace #71

rolfl opened this Issue Apr 7, 2012 · 0 comments


None yet

1 participant


This is inconsistent with other nul-namespace operations, which mostly tend to treat the null Namespace as Namespace.NO_NAMESPACE. From Gisella:

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.

@rolfl rolfl closed this in 587efe4 Apr 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment