Author: mrglavas
Date: Thu Jul 30 04:11:06 2009
New Revision: 799167

URL: http://svn.apache.org/viewvc?rev=799167&view=rev
Log:
Fix a potential NPE where the target namespace of the grammar could be null.

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

Modified: 
xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java?rev=799167&r1=799166&r2=799167&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java 
(original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java 
Thu Jul 30 04:11:06 2009
@@ -1161,7 +1161,7 @@
                 if (importedGrammars != null) {
                     for (int j=0; j<importedGrammars.size(); j++) {
                         SchemaGrammar isg = (SchemaGrammar) 
importedGrammars.elementAt(j);
-                        if 
(isg.getTargetNamespace().equals(newGrammar.getTargetNamespace())) {
+                        if 
(null2EmptyString(isg.getTargetNamespace()).equals(null2EmptyString(newGrammar.getTargetNamespace())))
 {
                             if (isg != newGrammar) {
                                 importedGrammars.set(j, newGrammar);
                             }



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

Reply via email to