changeset 465:aabe15fc346f

8020430: NullPointerException in xml sqe nightly result on 2013-07-12 Reviewed-by: chegar, lancea
author joehw
date Fri, 12 Jul 2013 11:12:40 -0700
parents 3b071f506ab9
children 74ec7b48e3be
files src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Tue Jul 09 16:34:52 2013 -0700
+++ b/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);