You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@locus.apache.org on 2000/11/13 18:30:24 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/dom ElementImpl.java
lehors 00/11/13 09:30:24
Modified: java/src/org/apache/xerces/dom ElementImpl.java
Log:
getAttributeNS must return an empty string when the attribute is
not set.
-- patch from Julian Reschke
Revision Changes Path
1.28 +2 -2 xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java
Index: ElementImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ElementImpl.java 2000/10/02 21:58:18 1.27
+++ ElementImpl.java 2000/11/13 17:30:24 1.28
@@ -491,7 +491,7 @@
* The namespace URI of the attribute to
* retrieve.
* @param localName The local name of the attribute to retrieve.
- * @return String The Attr value as a string, or null
+ * @return String The Attr value as a string, or empty string
* if that attribute
* does not have a specified or default value.
* @since WD-DOM-Level-2-19990923
@@ -507,7 +507,7 @@
}
Attr attr = (Attr)(attributes.getNamedItemNS(namespaceURI, localName));
- return (attr == null) ? null : attr.getValue();
+ return (attr == null) ? "" : attr.getValue();
} // getAttributeNS(String,String):String