Author: mrglavas
Date: Wed May 27 01:39:26 2009
New Revision: 778956

URL: http://svn.apache.org/viewvc?rev=778956&view=rev
Log:
Fixing JIRA Issue #1375: https://issues.apache.org/jira/browse/XERCESJ-1375. 
Fixing an NPE when a namespace is undeclared. Same issue that was addressed in 
SVN rev 694593. Patch thanks to Arthur De Magalhaes.

Modified:
    
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java

Modified: 
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java?rev=778956&r1=778955&r2=778956&view=diff
==============================================================================
--- 
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java
 (original)
+++ 
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/SchemaContentHandler.java
 Wed May 27 01:39:26 2009
@@ -338,7 +338,8 @@
                 rawname = XMLSymbols.PREFIX_XMLNS;
             }
             fAttributeQName.setValues(prefix, localpart, rawname, 
NamespaceContext.XMLNS_URI);
-            fAttributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, 
nsURI);
+            fAttributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, 
+                    (nsURI != null) ? nsURI : XMLSymbols.EMPTY_STRING);
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to