8020430: NullPointerException in xml sqe nightly result on 2013-07-12
Reviewed-by: chegar, lancea
--- 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);