2017-07-27 11:25 GMT+03:00 <[email protected]>: > Author: remm > Date: Thu Jul 27 08:25:46 2017 > New Revision: 1803135 > > URL: http://svn.apache.org/viewvc?rev=1803135&view=rev > Log: > Avoid circular dependency. > > Added: > > tomcat/trunk/java/org/apache/catalina/util/SystemPropertyReplacerListener.java > (with props) > Modified: > tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java > tomcat/trunk/webapps/docs/config/listeners.xml > tomcat/trunk/webapps/docs/config/systemprops.xml >
> Modified: tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java?rev=1803135&r1=1803134&r2=1803135&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java Thu Jul > 27 08:25:46 2017 > @@ -37,9 +37,6 @@ import javax.xml.parsers.ParserConfigura > [...] > + public static void replace() { I do not like this method name. It is too generic. And there is no way to customize its behaviour (no parameters). > + Log log = LogFactory.getLog(Digester.class); > + if (propertySource != null) { > + IntrospectionUtils.PropertySource[] propertySources = > + new IntrospectionUtils.PropertySource[] { propertySource > }; > + Properties properties = System.getProperties(); > + Set<String> names = properties.stringPropertyNames(); > + for (String name : names) { > + String value = System.getProperty(name); > + if (value != null) { > + try { > + String newValue = > IntrospectionUtils.replaceProperties(value, null, propertySources); > + if (value != newValue) { > + System.setProperty(name, newValue); > } > + } catch (Exception e) { > + > log.warn(sm.getString("digester.failedToUpdateSystemProperty", name, value), > e); > } > } > } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
