You are viewing a plain text version of this content. The canonical link for it is here.
Posted to crimson-cvs@xml.apache.org by ed...@apache.org on 2001/03/13 00:51:43 UTC

cvs commit: xml-crimson/src/org/apache/crimson/tree ElementNode2.java

edwingo     01/03/12 15:51:43

  Modified:    src/org/apache/crimson/tree ElementNode2.java
  Log:
  Fix Element.getAttributeNS(null, "foo") causes NPE
  
  Revision  Changes    Path
  1.5       +3 -2      xml-crimson/src/org/apache/crimson/tree/ElementNode2.java
  
  Index: ElementNode2.java
  ===================================================================
  RCS file: /home/cvs/xml-crimson/src/org/apache/crimson/tree/ElementNode2.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElementNode2.java	2001/03/09 01:04:26	1.4
  +++ ElementNode2.java	2001/03/12 23:51:43	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ElementNode2.java,v 1.4 2001/03/09 01:04:26 edwingo Exp $
  + * $Id: ElementNode2.java,v 1.5 2001/03/12 23:51:43 edwingo Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -388,7 +388,8 @@
                   return null;
               }
               if (attr.getLocalName().equals(localName)
  -                && attr.getNamespaceURI().equals(namespaceURI)) {
  +                && (attr.getNamespaceURI() == namespaceURI
  +                    || attr.getNamespaceURI().equals(namespaceURI))) {
                   return attr;
               }
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: crimson-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: crimson-cvs-help@xml.apache.org