You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/12/14 06:04:39 UTC

svn commit: r726360 - /xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java

Author: mrglavas
Date: Sat Dec 13 21:04:38 2008
New Revision: 726360

URL: http://svn.apache.org/viewvc?rev=726360&view=rev
Log:
Fixing JIRA Issue #1348:
http://issues.apache.org/jira/browse/XERCESJ-1348

itemByName() could fail with an NPE. We need to check that 
the SymbolHash returned a non-null value before checking 
whether the type categories match.

Modified:
    xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java

Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java?rev=726360&r1=726359&r2=726360&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java Sat Dec 13 21:04:38 2008
@@ -108,7 +108,7 @@
             if (isEqual(namespace, fNamespaces[i])) {
                 XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName);
                 // only return it if it matches the required type
-                if (type.getTypeCategory() == fType) {
+                if (type != null && type.getTypeCategory() == fType) {
                     return type;
                 }
                 return null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org