Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

rolfl opened this Issue · 0 comments

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.