diff options
author | joehw <none@none> | 2013-08-20 09:02:25 -0700 |
---|---|---|
committer | joehw <none@none> | 2013-08-20 09:02:25 -0700 |
commit | 65d7006c56fe33307186ba6f7e430c38d2dfbc35 (patch) | |
tree | 138b12dafdc0a97f392ad7d4026171e5f6046441 /src/com/sun/org/apache/xerces/internal/impl | |
parent | 63b7b4dc83125c11775f18be72ab552a7262b29e (diff) | |
download | jdk8u_jaxp-65d7006c56fe33307186ba6f7e430c38d2dfbc35.tar.gz |
8022682: Supporting XOM
Reviewed-by: alanb, chegar, lancea
Diffstat (limited to 'src/com/sun/org/apache/xerces/internal/impl')
-rw-r--r-- | src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java b/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java index 8fbf916..2c8f3af 100644 --- a/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java +++ b/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java @@ -178,6 +178,25 @@ public class PropertyManager { supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ; } + /** + * It's possible for users to set a security manager through the interface. + * If it's the old SecurityManager, convert it to the new XMLSecurityManager + */ + if (property.equals(Constants.SECURITY_MANAGER)) { + fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); + supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager); + return; + } + if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { + if (value == null) { + fSecurityPropertyMgr = new XMLSecurityPropertyManager(); + } else { + fSecurityPropertyMgr = (XMLSecurityPropertyManager)value; + } + supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); + return; + } + //check if the property is managed by security manager if (fSecurityManager == null || !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) { |