velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1776000 - /velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
Date Sun, 25 Dec 2016 09:52:16 GMT
Author: cbrisson
Date: Sun Dec 25 09:52:16 2016
New Revision: 1776000

URL: http://svn.apache.org/viewvc?rev=1776000&view=rev
Log:
[tools] reflect engine change in configuration API

Modified:
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java?rev=1776000&r1=1775999&r2=1776000&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
Sun Dec 25 09:52:16 2016
@@ -23,6 +23,7 @@ import java.io.InputStream;
 import java.io.IOException;
 import java.io.Writer;
 import java.util.List;
+import java.util.Properties;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
@@ -47,7 +48,6 @@ import org.apache.velocity.tools.config.
 import org.apache.velocity.tools.config.ConfigurationUtils;
 import org.apache.velocity.tools.config.FactoryConfiguration;
 import org.apache.velocity.tools.view.ViewToolContext;
-import org.apache.velocity.util.ExtProperties;
 import org.apache.velocity.util.SimplePool;
 
 /**
@@ -283,7 +283,7 @@ public class VelocityView extends ViewTo
     /**
      * Initializes the Velocity runtime, first calling
      * loadConfiguration(JeeConfig) to get a
-     * org.apache.velocity.util.ExtProperties
+     * java.util.Properties
      * of configuration information
      * and then calling velocityEngine.init().  Override this
      * to do anything to the environment before the
@@ -318,8 +318,8 @@ public class VelocityView extends ViewTo
     protected void configure(final JeeConfig config, final VelocityEngine velocity)
     {
         // first get the default properties, and bail if we don't find them
-        ExtProperties defaultProperties = getProperties(DEFAULT_PROPERTIES_PATH, true);
-        velocity.setExtendedProperties(defaultProperties);
+        Properties defaultProperties = getProperties(DEFAULT_PROPERTIES_PATH, true);
+        velocity.setProperties(defaultProperties);
 
         // check for application-wide user props in the context init params
         String appPropsPath = servletContext.getInitParameter(PROPERTIES_KEY);
@@ -357,7 +357,7 @@ public class VelocityView extends ViewTo
         // this will throw an exception if require is true and there
         // are no properties at the path.  if require is false, this
         // will return null when there's no properties at the path
-        ExtProperties props = getProperties(path, require);
+        Properties props = getProperties(path, require);
         if (props == null)
         {
             return false;
@@ -366,7 +366,7 @@ public class VelocityView extends ViewTo
         getLog().debug("Configuring Velocity with properties at: {}", path);
 
         // these props will override those already set
-        velocity.setExtendedProperties(props);
+        velocity.setProperties(props);
         // notify that new props were set
         return true;
     }
@@ -496,12 +496,12 @@ public class VelocityView extends ViewTo
     }
 
 
-    protected ExtProperties getProperties(String path)
+    protected Properties getProperties(String path)
     {
         return getProperties(path, false);
     }
 
-    protected ExtProperties getProperties(String path, boolean required)
+    protected Properties getProperties(String path, boolean required)
     {
         if (getLog().isTraceEnabled())
         {
@@ -514,7 +514,7 @@ public class VelocityView extends ViewTo
             return null;
         }
 
-        ExtProperties properties = new ExtProperties();
+        Properties properties = new Properties();
         try
         {
             properties.load(inputStream);



Mime
View raw message