Author: mrglavas
Date: Wed Feb 3 16:40:50 2010
New Revision: 906118
URL: http://svn.apache.org/viewvc?rev=906118&view=rev
Log:
Minor performance improvement. If the component manager is the loader config
don't bother querying it since it doesn't recognize the PARSER_SETTINGS
feature. Prevents an XMLConfigurationException from being thrown.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
URL:
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java?rev=906118&r1=906117&r2=906118&view=diff
==============================================================================
---
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
(original)
+++
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
Wed Feb 3 16:40:50 2010
@@ -233,7 +233,7 @@
// Data
// features and properties
- private ParserConfigurationSettings fLoaderConfig = new
ParserConfigurationSettings();
+ private final ParserConfigurationSettings fLoaderConfig = new
ParserConfigurationSettings();
private XMLErrorReporter fErrorReporter = new XMLErrorReporter ();
private XMLEntityManager fEntityManager = null;
private XMLEntityResolver fUserEntityResolver = null;
@@ -1138,10 +1138,15 @@
return SchemaDVFactory.getInstance();
}
private boolean parserSettingsUpdated(XMLComponentManager
componentManager) {
- try {
- return componentManager.getFeature(PARSER_SETTINGS);
+ // If the component manager is the loader config don't bother querying
it since it doesn't
+ // recognize the PARSER_SETTINGS feature. Prevents an
XMLConfigurationException from being
+ // thrown.
+ if (componentManager != fLoaderConfig) {
+ try {
+ return componentManager.getFeature(PARSER_SETTINGS);
+ }
+ catch (XMLConfigurationException e) {}
}
- catch (XMLConfigurationException e) {}
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]