Author: mukulg Date: Sun Mar 26 07:18:58 2023 New Revision: 1908724 URL: http://svn.apache.org/viewvc?rev=1908724&view=rev Log: xercesj commit : committing fix for jira issue XERCESJ-1754
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=1908724&r1=1908723&r2=1908724&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original) +++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Sun Mar 26 07:18:58 2023 @@ -1335,16 +1335,9 @@ public class XMLSchemaValidator * * @param componentManager The component manager. * - * @throws SAXException Thrown by component on finitialization error. - * For example, if a feature or property is - * required for the operation of the component, the - * component manager may throw a - * SAXNotRecognizedException or a - * SAXNotSupportedException. + * @throws XMLConfigurationException */ public void reset(XMLComponentManager componentManager) throws XMLConfigurationException { - - fIdConstraint = false; //reset XSDDescription fLocationPairs.clear(); @@ -1375,27 +1368,26 @@ public class XMLSchemaValidator // get error reporter fXSIErrorReporter.reset((XMLErrorReporter) componentManager.getProperty(ERROR_REPORTER)); - - boolean parser_settings; + try { - parser_settings = componentManager.getFeature(PARSER_SETTINGS); + boolean parser_settings = componentManager.getFeature(PARSER_SETTINGS); + + if (!parser_settings) { + // parser settings feature is not supported + + fValidationManager.addValidationState(fValidationState); + // the node limit on the SecurityManager may have changed so need to refresh + nodeFactory.reset(); + // Re-parse external schema location properties + XMLSchemaLoader.processExternalHints( + fExternalSchemas, + fExternalNoNamespaceSchema, + fLocationPairs, + fXSIErrorReporter.fErrorReporter); + } } catch (XMLConfigurationException e){ - parser_settings = true; - } - - if (!parser_settings) { - // parser settings have not been changed - fValidationManager.addValidationState(fValidationState); - // the node limit on the SecurityManager may have changed so need to refresh. - nodeFactory.reset(); - // Re-parse external schema location properties. - XMLSchemaLoader.processExternalHints( - fExternalSchemas, - fExternalNoNamespaceSchema, - fLocationPairs, - fXSIErrorReporter.fErrorReporter); - return; + // NO OP } // pass the component manager to the factory.. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org