You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2007/07/26 18:35:10 UTC
svn commit: r559877 -
/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
Author: nbubna
Date: Thu Jul 26 09:35:09 2007
New Revision: 559877
URL: http://svn.apache.org/viewvc?view=rev&rev=559877
Log:
make sure the default configuration is always clean
Modified:
velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java?view=diff&rev=559877&r1=559876&r2=559877
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java (original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/config/FactoryConfiguration.java Thu Jul 26 09:35:09 2007
@@ -196,9 +196,17 @@
{
FileFactoryConfiguration config = new XmlFactoryConfiguration();
config.read(GENERIC_CONFIGURATION_PATH);
+
// view tools and struts tools may not be available
config.read(VIEW_CONFIGURATION_PATH, false);
config.read(STRUTS_CONFIGURATION_PATH, false);
+
+ // default should *always* be clean!
+ // otherwise we may have issues (e.g. velocity-view jar used
+ // in non webapp environment where generic jar should've been used)
+ ConfigurationCleaner cleaner = new ConfigurationCleaner();
+ cleaner.clean(config);
+
return config;
}