# HG changeset patch # User lana # Date 1406055250 25200 # Node ID 8b6e86b96cb44351c5cd8891bd80f737a1e43ea1 # Parent d9ce05f36ffec3e5e8af62a92455c1c66a63c320# Parent 3a4b99c550c13a798a840bb228bd708ef0fd9b9d Merge diff -r d9ce05f36ffe -r 8b6e86b96cb4 jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java Wed Jul 05 19:51:30 2017 +0200 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java Tue Jul 22 11:54:10 2014 -0700 @@ -54,6 +54,7 @@ import com.sun.org.apache.xerces.internal.util.SymbolTable; import com.sun.org.apache.xerces.internal.util.XMLSymbols; import com.sun.org.apache.xerces.internal.utils.SecuritySupport; +import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; import com.sun.org.apache.xerces.internal.xni.XNIException; import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; @@ -982,6 +983,18 @@ */ public void reset(XMLComponentManager componentManager) throws XMLConfigurationException { + XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); + if (spm == null) { + spm = new XMLSecurityPropertyManager(); + setProperty(XML_SECURITY_PROPERTY_MANAGER, spm); + } + + XMLSecurityManager sm = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER); + if (sm == null) + setProperty(SECURITY_MANAGER,new XMLSecurityManager(true)); + + faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA); + fGrammarBucket.reset(); fSubGroupHandler.reset(); @@ -1065,9 +1078,6 @@ // get generate-synthetic-annotations feature fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false)); fSchemaHandler.reset(componentManager); - - XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); - faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA); } private void initGrammarBucket(){