Hi,

attached you find a patch file that fixes two possible
NullPointerExceptions in Crimson.

As there is no entry for Crimson in the bug database yet,
I am posting this here, hope that's fine.


Thanks,

Jochen
diff -ubr --exclude *.class --exclude .nbattrs --exclude *~ 
c:\Programme\JavaSoft\jaxp-1.1\crimson-1.1\src/org/apache/crimson/tree/AttributeSet.java
 i:\Prg\crimson-1.1\src/org/apache/crimson/tree/AttributeSet.java
--- 
c:\Programme\JavaSoft\jaxp-1.1\crimson-1.1\src/org/apache/crimson/tree/AttributeSet.java
    Tue Jan 30 14:24:28 2001
+++ i:\Prg\crimson-1.1\src/org/apache/crimson/tree/AttributeSet.java    Thu May 24 
+20:36:30 2001
@@ -145,7 +145,7 @@
                 uri = source.getURI(i);
                 // Translate "" of SAX2 to null.  See DOM2 spec under Node
                 // namespaceURI
-                if (uri.equals("")) {
+                if (uri != null  &&  uri.equals("")) {
                     uri = null;
                 }
             }
diff -ubr --exclude *.class --exclude .nbattrs --exclude *~ 
c:\Programme\JavaSoft\jaxp-1.1\crimson-1.1\src/org/apache/crimson/tree/XmlDocumentBuilder.java
 i:\Prg\crimson-1.1\src/org/apache/crimson/tree/XmlDocumentBuilder.java
--- 
c:\Programme\JavaSoft\jaxp-1.1\crimson-1.1\src/org/apache/crimson/tree/XmlDocumentBuilder.java
      Tue Jan 30 14:24:24 2001
+++ i:\Prg\crimson-1.1\src/org/apache/crimson/tree/XmlDocumentBuilder.java      Thu 
+May 24 20:37:51 2001
@@ -473,7 +473,7 @@
        //
         ElementNode e = null;
        try {
-            if (namespaceURI.equals("")) {
+            if (namespaceURI == null  ||  namespaceURI.equals("")) {
                 // No namespaceURI.  Enable element factory backward
                 // compatibility.
                 e = (ElementNode)document.createElementEx(rawName);

---------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to