Mercurial > hg > shenandoah-preopenjdk-archive > openjdk8 > jaxp
changeset 751:b26838791850
Merge
author | asaha |
---|---|
date | Thu, 29 May 2014 13:29:41 -0700 |
parents | 6188b63f8eb6 (diff) 37785ed1b80a (current diff) |
children | b29277565edf |
files | .hgtags |
diffstat | 3 files changed, 20 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Wed May 28 15:51:45 2014 -0700 +++ b/.hgtags Thu May 29 13:29:41 2014 -0700 @@ -300,3 +300,4 @@ 641333dd7ce2b46d4b8366d7194798c3fb28bb55 jdk8u20-b14 d03960b97ec8adc537f92bae9754e9ca6303880c jdk8u20-b15 cbde689ca74add6f9e47ba7e753d4dc9a28dfd16 jdk8u20-b16 +65e5ee249ebc81c0ccfff23946a0a2a6d4becdcc jdk8u25-b00
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Wed May 28 15:51:45 2014 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Thu May 29 13:29:41 2014 -0700 @@ -612,9 +612,9 @@ //fElementStack2.clear(); //fReplaceEntityReferences = true; //fSupportExternalEntities = true; - Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_REPLACING_ENTITY_REFERENCES); + Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES); fReplaceEntityReferences = bo.booleanValue(); - bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_SUPPORTING_EXTERNAL_ENTITIES); + bo = (Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES); fSupportExternalEntities = bo.booleanValue(); Boolean cdata = (Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.STAX_REPORT_CDATA_EVENT) ; if(cdata != null)
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Wed May 28 15:51:45 2014 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Thu May 29 13:29:41 2014 -0700 @@ -53,6 +53,7 @@ import java.util.Map; import java.util.Stack; import javax.xml.XMLConstants; +import javax.xml.stream.XMLInputFactory; /** @@ -305,6 +306,11 @@ /** Property Manager. This is used from Stax */ protected PropertyManager fPropertyManager ; + /** StAX properties */ + boolean fSupportDTD = true; + boolean fReplaceEntityReferences = true; + boolean fSupportExternalEntities = true; + /** used to restrict external access */ protected String fAccessExternalDTD = EXTERNAL_ACCESS_DEFAULT; @@ -1136,7 +1142,8 @@ boolean parameter = entityName.startsWith("%"); boolean general = !parameter; if (unparsed || (general && !fExternalGeneralEntities) || - (parameter && !fExternalParameterEntities)) { + (parameter && !fExternalParameterEntities) || + !fSupportDTD || !fSupportExternalEntities) { if (fEntityHandler != null) { fResourceIdentifier.clear(); @@ -1431,6 +1438,10 @@ fStaxEntityResolver = null; } + fSupportDTD = ((Boolean)propertyManager.getProperty(XMLInputFactory.SUPPORT_DTD)).booleanValue(); + fReplaceEntityReferences = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)).booleanValue(); + fSupportExternalEntities = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES)).booleanValue(); + // Zephyr feature ignore-external-dtd is the opposite of Xerces' load-external-dtd fLoadExternalDTD = !((Boolean)propertyManager.getProperty(Constants.ZEPHYR_PROPERTY_PREFIX + Constants.IGNORE_EXTERNAL_DTD)).booleanValue(); @@ -1502,6 +1513,11 @@ fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); + //StAX Property + fSupportDTD = true; + fReplaceEntityReferences = true; + fSupportExternalEntities = true; + // JAXP 1.5 feature XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER, null); if (spm == null) {