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:10 UTC
svn commit: r726359 -
/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Author: mrglavas
Date: Sat Dec 13 21:04:10 2008
New Revision: 726359
URL: http://svn.apache.org/viewvc?rev=726359&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/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java?rev=726359&r1=726358&r2=726359&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/util/XSNamedMap4Types.java Sat Dec 13 21:04:10 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