Mercurial > hg > release > icedtea7-forest-2.4 > jaxp
changeset 828:55e8ea7085b7
8029038: Revise fix for XML readers share the same entity expansion counter
Reviewed-by: joehw, mbankal
line wrap: on
line diff
--- a/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Tue Nov 26 19:33:19 2013 +0000 @@ -87,18 +87,8 @@ HashMap properties = propertyManager.getProperties(); supportedProps.putAll(properties); - Object temp = getProperty(SECURITY_MANAGER); - //writers have no need for the managers - if (temp != null) { - fSecurityManager = new XMLSecurityManager((XMLSecurityManager)temp); - supportedProps.put(SECURITY_MANAGER, fSecurityManager); - } - temp = getProperty(XML_SECURITY_PROPERTY_MANAGER); - if (temp != null) { - fSecurityPropertyMgr = new XMLSecurityPropertyManager( - (XMLSecurityPropertyManager)temp); - supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); - } + fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER); + fSecurityPropertyMgr = (XMLSecurityPropertyManager)getProperty(XML_SECURITY_PROPERTY_MANAGER); } private HashMap getProperties(){ @@ -192,18 +182,18 @@ * 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(SECURITY_MANAGER)) { + if (property.equals(Constants.SECURITY_MANAGER)) { fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager); - supportedProps.put(SECURITY_MANAGER, fSecurityManager); + supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager); return; } - if (property.equals(XML_SECURITY_PROPERTY_MANAGER)) { + if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) { if (value == null) { fSecurityPropertyMgr = new XMLSecurityPropertyManager(); } else { fSecurityPropertyMgr = (XMLSecurityPropertyManager)value; } - supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); + supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr); return; }
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Tue Nov 26 19:33:19 2013 +0000 @@ -44,6 +44,7 @@ import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler; import com.sun.org.apache.xerces.internal.impl.Constants; +import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager; import com.sun.xml.internal.stream.Entity; @@ -262,6 +263,11 @@ fEntityManager.startDTDEntity(inputSource); } // setInputSource(XMLInputSource) + + public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) { + fLimitAnalyzer = limitAnalyzer; + } + /** * Scans the external subset of the document. * @@ -1625,10 +1631,10 @@ XMLString literal = fString; XMLString literal2 = fString; int countChar = 0; - if (fLimitAnalyzer == null && fSecurityManager != null) { - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); + if (fLimitAnalyzer == null ) { + fLimitAnalyzer = new XMLLimitAnalyzer(); + } fLimitAnalyzer.startEntity(entityName); - } if (fEntityScanner.scanLiteral(quote, fString) != quote) { fStringBuffer.clear(); @@ -2145,6 +2151,8 @@ // set starting state setScannerState(SCANNER_STATE_TEXT_DECL); //new SymbolTable()); + + fLimitAnalyzer = new XMLLimitAnalyzer(); } /** @@ -2164,18 +2172,18 @@ */ private void checkLimit(String entityName, int len) { if (fLimitAnalyzer == null) { - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); + fLimitAnalyzer = new XMLLimitAnalyzer(); } fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len); - if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("MaxEntitySizeLimit", new Object[]{entityName, fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT), fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)}); } - if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("TotalEntitySizeLimit", new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT),
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Nov 26 19:33:19 2013 +0000 @@ -569,32 +569,13 @@ // xerces features fReportCdataEvent = componentManager.getFeature(Constants.STAX_REPORT_CDATA_EVENT, true); - fSecurityManager = (XMLSecurityManager)componentManager.getProperty(Constants.SECURITY_MANAGER, null); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); - - fElementAttributeLimit = (fSecurityManager != null)? - fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT):0; - fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS, false); Object resolver = componentManager.getProperty(ENTITY_RESOLVER, null); fExternalSubsetResolver = (resolver instanceof ExternalSubsetResolver) ? (ExternalSubsetResolver) resolver : null; - // initialize vars - fMarkupDepth = 0; - fCurrentElement = null; - fElementStack.clear(); - fHasExternalDTD = false; - fStandaloneSet = false; - fStandalone = false; - fInScanContent = false; - //skipping algorithm - fShouldSkip = false; - fAdd = false; - fSkip = false; - //attribute fReadingAttributes = false; //xxx: external entities are supported in Xerces @@ -606,9 +587,6 @@ // setup Driver setScannerState(SCANNER_STATE_CONTENT); setDriver(fContentDriver); - fEntityStore = fEntityManager.getEntityStore(); - - dtdGrammarUtil = null; // JAXP 1.5 features and properties XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) @@ -617,6 +595,7 @@ fStrictURI = componentManager.getFeature(STANDARD_URI_CONFORMANT, false); + resetCommon(); //fEntityManager.test(); } // reset(XMLComponentManager) @@ -630,17 +609,7 @@ fNamespaces = ((Boolean)propertyManager.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue(); fNotifyBuiltInRefs = false ; - // initialize vars - fMarkupDepth = 0; - fCurrentElement = null; - fShouldSkip = false; - fAdd = false; - fSkip = false; - fElementStack.clear(); //fElementStack2.clear(); - fHasExternalDTD = false; - fStandaloneSet = false; - fStandalone = false; //fReplaceEntityReferences = true; //fSupportExternalEntities = true; Boolean bo = (Boolean)propertyManager.getProperty(XMLInputFactoryImpl.IS_REPLACING_ENTITY_REFERENCES); @@ -661,20 +630,43 @@ //we dont need to do this -- nb. //setScannerState(SCANNER_STATE_CONTENT); //setDriver(fContentDriver); - fEntityStore = fEntityManager.getEntityStore(); //fEntityManager.test(); - dtdGrammarUtil = null; - // JAXP 1.5 features and properties XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager) propertyManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(Constants.SECURITY_MANAGER); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); + resetCommon(); } // reset(XMLComponentManager) + void resetCommon() { + // initialize vars + fMarkupDepth = 0; + fCurrentElement = null; + fElementStack.clear(); + fHasExternalDTD = false; + fStandaloneSet = false; + fStandalone = false; + fInScanContent = false; + //skipping algorithm + fShouldSkip = false; + fAdd = false; + fSkip = false; + + fEntityStore = fEntityManager.getEntityStore(); + dtdGrammarUtil = null; + + if (fSecurityManager != null) { + fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT); + } else { + fElementAttributeLimit = 0; + } + fLimitAnalyzer = new XMLLimitAnalyzer(); + fEntityManager.setLimitAnalyzer(fLimitAnalyzer); + } + /** * Returns a list of feature identifiers that are recognized by * this component. This method may return null if no features @@ -1328,7 +1320,7 @@ fAttributes.getLength() > fElementAttributeLimit){ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "ElementAttributeLimit", - new Object[]{rawname, new Integer(fAttributes.getLength()) }, + new Object[]{rawname, fElementAttributeLimit }, XMLErrorReporter.SEVERITY_FATAL_ERROR ); } @@ -3163,15 +3155,15 @@ protected void checkLimit(XMLStringBuffer buffer) { if (fLimitAnalyzer.isTracking(fCurrentEntityName)) { fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length); - if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName, fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT), fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)}); } - if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT)) { - fSecurityManager.debugPrint(); + if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) { + fSecurityManager.debugPrint(fLimitAnalyzer); reportFatalError("TotalEntitySizeLimit", new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT), fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT),
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java Tue Nov 26 19:33:19 2013 +0000 @@ -1090,6 +1090,8 @@ ((XMLDTDScannerImpl)fDTDScanner).reset(fPropertyManager); } + + fDTDScanner.setLimitAnalyzer(fLimitAnalyzer); do { again = false; switch (fScannerState) {
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java Tue Nov 26 19:33:19 2013 +0000 @@ -1297,8 +1297,8 @@ if(fLimitAnalyzer != null) { fLimitAnalyzer.addValue(entityExpansionIndex, name, 1); } - if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex)){ - fSecurityManager.debugPrint(); + if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex, fLimitAnalyzer)){ + fSecurityManager.debugPrint(fLimitAnalyzer); fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded", new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)}, XMLErrorReporter.SEVERITY_FATAL_ERROR ); @@ -1367,7 +1367,7 @@ if (fLimitAnalyzer != null) { fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name); if (fCurrentEntity.name.equals("[xml]")) { - fSecurityManager.debugPrint(); + fSecurityManager.debugPrint(fLimitAnalyzer); } } fCurrentEntity.close(); @@ -1436,7 +1436,6 @@ fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); // initialize state //fStandalone = false; @@ -1498,7 +1497,6 @@ fStaxEntityResolver = (StaxEntityResolverWrapper)componentManager.getProperty(STAX_ENTITY_RESOLVER, null); fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER, null); fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null); - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT); // JAXP 1.5 feature @@ -1656,7 +1654,6 @@ if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() && propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) { fSecurityManager = (XMLSecurityManager)value; - fLimitAnalyzer = fSecurityManager.getLimitAnalyzer(); } } @@ -1667,6 +1664,11 @@ fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD); } } + + public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) { + this.fLimitAnalyzer = fLimitAnalyzer; + } + /** * Returns a list of property identifiers that are recognized by * this component. This method may return null if no properties
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Tue Nov 26 19:33:19 2013 +0000 @@ -256,7 +256,7 @@ fAttributes.getLength() > fElementAttributeLimit){ fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "ElementAttributeLimit", - new Object[]{rawname, new Integer(fAttributes.getLength()) }, + new Object[]{rawname, fElementAttributeLimit }, XMLErrorReporter.SEVERITY_FATAL_ERROR ); }
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Tue Nov 26 19:33:19 2013 +0000 @@ -687,7 +687,6 @@ XMLSecurityManager securityManager = (XMLSecurityManager) fComponentManager.getProperty(SECURITY_MANAGER); if (securityManager != null) { try { - securityManager.resetLimits(); reader.setProperty(SECURITY_MANAGER, securityManager); } // Ignore the exception if the security manager cannot be set.
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Nov 26 19:33:19 2013 +0000 @@ -440,9 +440,6 @@ fSchemaValidator.reset(this); // Mark configuration as fixed. fConfigUpdated = false; - if (fInitSecurityManager != null) { - fInitSecurityManager.resetLimits(); - } } void setErrorHandler(ErrorHandler errorHandler) {
--- a/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Tue Nov 26 19:33:19 2013 +0000 @@ -150,9 +150,6 @@ * reset all components before parsing */ protected void reset() throws XNIException { - if (securityManager != null) { - securityManager.resetLimits(); - } } // reset() } // class XMLParser
--- a/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java Tue Nov 26 19:33:19 2013 +0000 @@ -77,7 +77,6 @@ } } - private XMLSecurityManager securityManager; /** * Max value accumulated for each property */ @@ -101,8 +100,7 @@ * Default constructor. Establishes default values for known security * vulnerabilities. */ - public XMLLimitAnalyzer(XMLSecurityManager securityManager) { - this.securityManager = securityManager; + public XMLLimitAnalyzer() { values = new int[Limit.values().length]; totalValue = new int[Limit.values().length]; names = new String[Limit.values().length]; @@ -110,18 +108,6 @@ } /** - * Reset all limits to their default status - */ - public void reset() { - for (int i=0; i<Limit.values().length; i++) { - values[i] = 0; - totalValue[i] = 0; - names[i] = null; - caches[i] = null; - } - } - - /** * Add the value to the current max count for the specified property * To find the max value of all entities, set no limit * @@ -233,7 +219,7 @@ } } - public void debugPrint() { + public void debugPrint(XMLSecurityManager securityManager) { Formatter formatter = new Formatter(); System.out.println(formatter.format("%30s %15s %15s %15s %30s", "Property","Limit","Total size","Size","Entity Name"));
--- a/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java Tue Nov 26 19:33:19 2013 +0000 @@ -132,7 +132,7 @@ /** * Values of the properties */ - private int[] values; + private final int[] values; /** * States of the settings for each property */ @@ -148,7 +148,6 @@ private boolean[] isSet; - private XMLLimitAnalyzer limitAnalyzer; /** * Index of the special entityCountInfo property */ @@ -169,7 +168,9 @@ * @param secureProcessing */ public XMLSecurityManager(boolean secureProcessing) { - init(); + values = new int[Limit.values().length]; + states = new State[Limit.values().length]; + isSet = new boolean[Limit.values().length]; this.secureProcessing = secureProcessing; for (Limit limit : Limit.values()) { if (secureProcessing) { @@ -185,39 +186,6 @@ } /** - * Clone a security manager - * @param securityManager a base security manager - */ - public XMLSecurityManager(XMLSecurityManager securityManager) { - init(); - if (securityManager != null) { - this.secureProcessing = securityManager.isSecureProcessing(); - for (Limit limit : Limit.values()) { - values[limit.ordinal()] = securityManager.getLimit(limit); - states[limit.ordinal()] = securityManager.getState(limit); - } - } - } - - /** - * Initialize values - */ - private void init() { - limitAnalyzer = new XMLLimitAnalyzer(this); - int numOfElements = Limit.values().length; - values = new int[numOfElements]; - states = new State[numOfElements]; - isSet = new boolean[numOfElements]; - } - - /** - * Reset all limits to their default status - */ - public void resetLimits() { - limitAnalyzer.reset(); - } - - /** * Setting FEATURE_SECURE_PROCESSING explicitly */ public void setSecureProcessing(boolean secure) { @@ -279,13 +247,15 @@ if (index == indexEntityCountInfo) { printEntityCountInfo = (String)value; } else { - int temp = 0; - try { + int temp; + if (Integer.class.isAssignableFrom(value.getClass())) { + temp = ((Integer)value).intValue(); + } else { temp = Integer.parseInt((String) value); if (temp < 0) { temp = 0; } - } catch (NumberFormatException e) {} + } setLimit(index, state, temp); } } @@ -417,8 +387,9 @@ * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(Limit limit, String entityName, int size) { - return isOverLimit(limit.ordinal(), entityName, size); + public boolean isOverLimit(Limit limit, String entityName, int size, + XMLLimitAnalyzer limitAnalyzer) { + return isOverLimit(limit.ordinal(), entityName, size, limitAnalyzer); } /** @@ -430,7 +401,8 @@ * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(int index, String entityName, int size) { + public boolean isOverLimit(int index, String entityName, int size, + XMLLimitAnalyzer limitAnalyzer) { if (values[index] == NO_LIMIT) { return false; } @@ -448,11 +420,11 @@ * @param size the size (count or length) of the entity * @return true if the size is over the limit, false otherwise */ - public boolean isOverLimit(Limit limit) { - return isOverLimit(limit.ordinal()); + public boolean isOverLimit(Limit limit, XMLLimitAnalyzer limitAnalyzer) { + return isOverLimit(limit.ordinal(), limitAnalyzer); } - public boolean isOverLimit(int index) { + public boolean isOverLimit(int index, XMLLimitAnalyzer limitAnalyzer) { if (values[index] == NO_LIMIT) { return false; } @@ -466,29 +438,12 @@ } } - public void debugPrint() { + public void debugPrint(XMLLimitAnalyzer limitAnalyzer) { if (printEntityCountInfo.equals(Constants.JDK_YES)) { - limitAnalyzer.debugPrint(); + limitAnalyzer.debugPrint(this); } } - /** - * Return the limit analyzer - * - * @return the limit analyzer - */ - public XMLLimitAnalyzer getLimitAnalyzer() { - return limitAnalyzer; - } - - /** - * Set limit analyzer - * - * @param analyzer a limit analyzer - */ - public void setLimitAnalyzer(XMLLimitAnalyzer analyzer) { - limitAnalyzer = analyzer; - } /** * Indicate if a property is set explicitly
--- a/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java Tue Nov 26 19:33:19 2013 +0000 @@ -91,19 +91,6 @@ readSystemProperties(); } - /** - * Clone a XMLSecurityPropertyManager - * @param propertyManager the base XMLSecurityPropertyManager - */ - public XMLSecurityPropertyManager(XMLSecurityPropertyManager propertyManager) { - values = new String[Property.values().length]; - if (propertyManager != null) { - for (Property property : Property.values()) { - values[property.ordinal()] = propertyManager.getValue(property); - states[property.ordinal()] = propertyManager.getState(property); - } - } - } /** * Set limit by property name and state @@ -202,15 +189,6 @@ } /** - * Return the state of a property - * @param property - * @return return the state of the property - */ - public State getState(Property property) { - return states[property.ordinal()]; - } - - /** * Read from system properties, or those in jaxp.properties */ private void readSystemProperties() {
--- a/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java Thu Nov 21 19:36:12 2013 +0000 +++ b/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java Tue Nov 26 19:33:19 2013 +0000 @@ -20,6 +20,7 @@ package com.sun.org.apache.xerces.internal.xni.parser; +import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer; import java.io.IOException; import com.sun.org.apache.xerces.internal.xni.XNIException; @@ -95,4 +96,5 @@ public boolean scanDTDExternalSubset(boolean complete) throws IOException, XNIException; + public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer); } // interface XMLDTDScanner