velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r524294 - /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
Date Fri, 30 Mar 2007 22:05:15 GMT
Author: nbubna
Date: Fri Mar 30 15:05:14 2007
New Revision: 524294

URL: http://svn.apache.org/viewvc?view=rev&rev=524294
Log:
require configuration to be valid before applying

Modified:
    velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java

Modified: velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java?view=diff&rev=524294&r1=524293&r2=524294
==============================================================================
--- velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
(original)
+++ velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java
Fri Mar 30 15:05:14 2007
@@ -53,10 +53,8 @@
 
     public synchronized void configure(FactoryConfiguration config)
     {
-        if (!config.isValid())
-        {
-            throw new IllegalArgumentException("FactoryConfiguration is not valid");
-        }
+        // this will throw a ConfigurationException if there is a problem
+        config.validate();
 
         // first do the easy part and add any data
         for (Data datum : config.getData())



Mime
View raw message