You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by bu...@apache.org on 2007/03/08 13:56:00 UTC

DO NOT REPLY [Bug 40819] - NPE in IdResolver

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40819>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40819





------- Additional Comments From zkovacevic@gmx.de  2007-03-08 04:56 -------
For DOM Level 1 *NS methods doesn't work.

For me I applied following fix:
was:
 String name=n.getLocalName();
 if (name.length()>2)

now:
String name = n.getNodeName();
int x = name.length()-Math.max(name.indexOf(':'), 0)-1;
if (x>2)


(In reply to comment #4)
> (In reply to comment #3)
> > You must always use *NS methods, The non *NS methods should dia a horrible 
> death.
> > Also the code that is throwing the exception has not changed so I suppose it
> > also happens in 1.4.beta2 and even 1.3.
> > I can prevent the NPE but it will silently fail and will never find a element.
> > The only sensible thing is to throw an exception when localName  is null (i.e.
> > has be done with non NS member). 
> > The problem is that then we should fill the code in several other parts with
> > this check, to be consistent.
> 
> Why don�t you use both Attr APIs (i.e. getLocalName and getName)? This way, if 
> getLocalName returns null for DOM1 cases or non qualified attributes, you could 
> use getName for backward compatibility.
> 
> Greetings,
> Jorge.
> > What do you all think?
> > Anyway I downgrade the severity of the bug. 
> 
> 



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.