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/03/31 00:05:15 UTC

svn commit: r524294 - /velocity/tools/branches/2.x/src/main/java/org/apache/velocity/tools/ToolboxFactory.java

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())