8020430: NullPointerException in xml sqe nightly result on 2013-07-12
authorjoehw
Fri, 12 Jul 2013 11:12:40 -0700
changeset 18891 be38bcc1d0f3
parent 18890 25bdeca3173b
child 18892 8c0ce47b4b82
8020430: NullPointerException in xml sqe nightly result on 2013-07-12 Reviewed-by: chegar, lancea
jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Tue Jul 09 16:34:52 2013 -0700
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Fri Jul 12 11:12:40 2013 -0700
@@ -142,7 +142,7 @@
      */
     public boolean containsProperty(String property){
         return supportedProps.containsKey(property) ||
-                fSecurityPropertyMgr.getIndex(property) > -1 ;
+                (fSecurityPropertyMgr!=null && fSecurityPropertyMgr.getIndex(property) > -1) ;
     }
 
     public Object getProperty(String property){
@@ -169,7 +169,7 @@
             supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ;
         }
 
-        int index = fSecurityPropertyMgr.getIndex(property);
+        int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(property) : -1;
         if (index > -1) {
             fSecurityPropertyMgr.setValue(index,
                     XMLSecurityPropertyManager.State.APIPROPERTY, (String)value);