velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject svn commit: r1842348 - in /velocity/tools/trunk: velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/veloc...
Date Sat, 29 Sep 2018 22:35:01 GMT
Author: michaelo
Date: Sat Sep 29 22:35:00 2018
New Revision: 1842348

URL: http://svn.apache.org/viewvc?rev=1842348&view=rev
Log:
Code cleanups

* Remove unused imports
* Add serial id to serializable classes

Modified:
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java
    velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/tool/LayoutLinkTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationException.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/InvalidScopeException.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/NullKeyException.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/RenderTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/AlternatorToolTests.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java
    velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JsonTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletUtils.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityView.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewFilter.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolContext.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolManager.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/XmlTool.java
    velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java
    velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/VelocityViewTest.java

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java Sat Sep 29 22:35:00 2018
@@ -6,6 +6,8 @@ import javax.servlet.http.HttpServletReq
 
 public class ShowcaseLayoutServlet extends VelocityLayoutServlet
 {
+    private static final long serialVersionUID = -8743195198276764930L;
+
     /**
      * Searches for a non-default layout to be used for this request.
      * This implementation checks the request parameters and attributes.

Modified: velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/tool/LayoutLinkTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/tool/LayoutLinkTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/tool/LayoutLinkTool.java (original)
+++ velocity/tools/trunk/velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/tool/LayoutLinkTool.java Sat Sep 29 22:35:00 2018
@@ -33,8 +33,10 @@ import org.apache.velocity.tools.view.Ve
 public class LayoutLinkTool extends LinkTool
 {
 
-	public LayoutLinkTool layout(Object obj)
-	{
+    private static final long serialVersionUID = -3140621321122037963L;
+
+    public LayoutLinkTool layout(Object obj)
+    {
         if (obj == null)
         {
             return null;
@@ -49,6 +51,6 @@ public class LayoutLinkTool extends Link
             layout += ".vm";
         }
         return (LayoutLinkTool)param(VelocityLayoutServlet.KEY_LAYOUT, layout);
-	}
+    }
 
 }

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationException.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationException.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationException.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationException.java Sat Sep 29 22:35:00 2018
@@ -20,13 +20,15 @@ package org.apache.velocity.tools.config
  */
 
 /**
- * 
+ *
  *
  * @author Nathan Bubna
  * @version $Id: ConfigurationException.java 511959 2007-02-26 19:24:39Z nbubna $
  */
 public class ConfigurationException extends RuntimeException
 {
+    private static final long serialVersionUID = -561545916548921830L;
+
     private final Object source;
 
     public ConfigurationException(Data data, Throwable cause)

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ConfigurationUtils.java Sat Sep 29 22:35:00 2018
@@ -20,8 +20,6 @@ package org.apache.velocity.tools.config
  */
 
 import java.io.File;
-import java.io.InputStream;
-import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -34,7 +32,6 @@ import org.apache.velocity.exception.Res
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.tools.ClassUtils;
 import org.apache.velocity.tools.ToolboxFactory;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/InvalidScopeException.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/InvalidScopeException.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/InvalidScopeException.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/InvalidScopeException.java Sat Sep 29 22:35:00 2018
@@ -20,13 +20,15 @@ package org.apache.velocity.tools.config
  */
 
 /**
- * 
+ *
  *
  * @author Nathan Bubna
  * @version $Id: InvalidScopeException.java 511959 2007-02-26 19:24:39Z nbubna $
  */
 public class InvalidScopeException extends ConfigurationException
 {
+    private static final long serialVersionUID = -8551578237473304915L;
+
     // this isn't crucial to keep around if the exception is serialized
     private final transient ToolConfiguration tool;
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/NullKeyException.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/NullKeyException.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/NullKeyException.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/NullKeyException.java Sat Sep 29 22:35:00 2018
@@ -20,13 +20,15 @@ package org.apache.velocity.tools.config
  */
 
 /**
- * 
+ *
  *
  * @author Nathan Bubna
  * @version $Id: NullKeyException.java 511959 2007-02-26 19:24:39Z nbubna $
  */
 public class NullKeyException extends ConfigurationException
 {
+    private static final long serialVersionUID = -3939817560016273430L;
+
     public NullKeyException(Data data)
     {
         super(data, "Key is null for data with value of '"+data.getValue()+'\'');

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/config/ToolboxConfiguration.java Sat Sep 29 22:35:00 2018
@@ -20,7 +20,7 @@ package org.apache.velocity.tools.config
  */
 
 import java.util.Collection;
-import java.util.SortedSet;
+
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.ToolboxFactory;
 
@@ -127,7 +127,7 @@ public class ToolboxConfiguration
                     throw new InvalidScopeException(this, tool);
                 }
             }
- 
+
             // if the set of valid scopes has been limited, check to be
             // sure that this toolbox's scope is in the set
             String[] validScopes = tool.getValidScopes();

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/CollectionTool.java Sat Sep 29 22:35:00 2018
@@ -117,6 +117,8 @@ import java.util.Map;
 @DefaultKey("collection")
 public class CollectionTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = 1410809929945061865L;
+
     public static final String STRINGS_DELIMITER_FORMAT_KEY = "stringsDelimiter";
     public static final String STRINGS_TRIM_KEY = "trimStrings";
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ComparisonDateTool.java Sat Sep 29 22:35:00 2018
@@ -72,24 +72,26 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.APPLICATION)
 public class ComparisonDateTool extends DateTool
 {
+    private static final long serialVersionUID = 6847034688404674662L;
+
     /** The number of milliseconds in a second. */
     public static final long MILLIS_PER_SECOND = 1000l;
-    
+
     /** The number of millseconds in a minute. */
     public static final long MILLIS_PER_MINUTE = 60l * MILLIS_PER_SECOND;
-    
+
     /** The number of milliseconds in an hour. */
     public static final long MILLIS_PER_HOUR = 60l * MILLIS_PER_MINUTE;
-    
+
     /** The number of milliseconds in a day. */
     public static final long MILLIS_PER_DAY = 24l * MILLIS_PER_HOUR;
-    
+
     /** The number of milliseconds in a week. */
     public static final long MILLIS_PER_WEEK = 7l * MILLIS_PER_DAY;
-    
+
     /** An approximation of the number of milliseconds in a month. */
     public static final long MILLIS_PER_MONTH = 30l * MILLIS_PER_DAY;
-    
+
     /** An approximation of the number of milliseconds in a year. */
     public static final long MILLIS_PER_YEAR = 365l * MILLIS_PER_DAY;
 
@@ -103,7 +105,7 @@ public class ComparisonDateTool extends
     public static final String SKIPPED_UNITS_KEY = "skip";
 
     /** The default path of the relative format resource bundles. */
-    public static final String DEFAULT_BUNDLE_NAME = 
+    public static final String DEFAULT_BUNDLE_NAME =
         "org.apache.velocity.tools.generic.times";
 
 
@@ -301,7 +303,7 @@ public class ComparisonDateTool extends
      * {@link #getCalendar()} and the specified date.  The default
      * rendering of that Comparison will be the largest unit difference
      * between the dates followed by a description of their relative position.
-     * 
+     *
      * @param then The date in question
      */
     public Comparison whenIs(Object then)
@@ -314,7 +316,7 @@ public class ComparisonDateTool extends
      * and the first specified date.  The default
      * rendering of that Comparison will be the largest unit difference
      * between the dates followed by a description of their relative position.
-     * 
+     *
      * @param now The date to use as representative of "now"
      * @param then The date in question
      */
@@ -328,7 +330,7 @@ public class ComparisonDateTool extends
      * the second specified date and the first specified date.  The default
      * rendering of that Comparison will be the largest unit difference
      * between the dates.
-     * 
+     *
      * @param now The date to use as representative of "now"
      * @param then The secondary date
      */
@@ -349,7 +351,7 @@ public class ComparisonDateTool extends
         long ms = calThen.getTimeInMillis() - calNow.getTimeInMillis();
         return new Comparison(ms, type, this.depth, false, null);
     }
-        
+
 
     /**
      * @param ms The time in milliseconds
@@ -403,13 +405,13 @@ public class ComparisonDateTool extends
             // then return without direction suffix
             return friendly;
         }
-            
+
         // otherwise, get the appropriate direction key
         String directionKey = (isBefore) ? BEFORE_KEY : AFTER_KEY;
         if (type == CURRENT_TYPE)
         {
             directionKey = CURRENT_PREFIX + directionKey;
-            
+
             if (friendly != null && friendly.startsWith("1"))
             {
                 // check for the corner case of "1 day ago" or "1 day away"
@@ -441,12 +443,12 @@ public class ComparisonDateTool extends
 
     /**
      * Converts the specified positive duration of milliseconds into larger
-     * units up to the specified number of positive units, beginning with the 
+     * units up to the specified number of positive units, beginning with the
      * largest positive unit.  e.g.
      * <code>toString(181453, 3, false, null)</code> will return
      * "3 minutes 1 second 453 milliseconds",
      * <code>toString(181453, 2, false, null)</code> will return
-     * "3 minutes 1 second", and 
+     * "3 minutes 1 second", and
      * <code>toString(180000, 2, true, null)</code> will return
      * "3 min".
      */
@@ -648,7 +650,7 @@ public class ComparisonDateTool extends
         }
 
         /**
-         * Sets this comparison to be rendered as a 
+         * Sets this comparison to be rendered as a
          * {@link ComparisonDateTool#difference}. This effectively means that
          * the comparison will render as a period of time, without any suffix
          * to describe the relative position of the dates being compared (e.g. "later"

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ContextTool.java Sat Sep 29 22:35:00 2018
@@ -60,6 +60,8 @@ import org.apache.velocity.tools.generic
 @InvalidScope({Scope.APPLICATION,Scope.SESSION})
 public class ContextTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = 2214413657621101511L;
+
     protected Context context;
     protected Map<String,Object> toolbox;
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DateTool.java Sat Sep 29 22:35:00 2018
@@ -86,6 +86,8 @@ import org.apache.velocity.tools.config.
 @DefaultKey("date")
 public class DateTool extends FormatConfig implements Serializable
 {
+    private static final long serialVersionUID = 2300448853392306057L;
+
     /**
      * The key used for specifying a default timezone via tool configuration.
      */

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/DisplayTool.java Sat Sep 29 22:35:00 2018
@@ -16,7 +16,7 @@ package org.apache.velocity.tools.generi
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.    
+ * under the License.
  */
 
 import java.io.Serializable;
@@ -38,7 +38,7 @@ import org.apache.velocity.tools.config.
  * Currently, this class contains methods for "pretty printing" an array or
  * {@link Collection}, methods for truncating the string value of a reference
  * at a configured or specified length, methods for displaying an alternate
- * value when a specified value is null, a method for generating whitespace, 
+ * value when a specified value is null, a method for generating whitespace,
  * a "printf" type of method for formatting messages, and
  * methods for forcing values into "cells" of equal size (via truncation or
  * padding with whitespace).
@@ -64,7 +64,7 @@ import org.apache.velocity.tools.config.
  *   This is...
  *   Not Null: not null
  *   Null: --
- *   
+ *
  * </pre>
  *
  * @since VelocityTools 2.0
@@ -78,6 +78,8 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.APPLICATION)
 public class DisplayTool extends LocaleConfig implements Serializable
 {
+    private static final long serialVersionUID = 2841919854651475788L;
+
     public static final String LIST_DELIM_KEY = "listDelim";
     public static final String LIST_FINAL_DELIM_KEY = "listFinalDelim";
     public static final String TRUNCATE_LENGTH_KEY = "truncateLength";
@@ -101,13 +103,13 @@ public class DisplayTool extends LocaleC
     /**
      * Does the actual configuration. This is protected, so
      * subclasses may share the same ValueParser and call configure
-     * at any time, while preventing templates from doing so when 
+     * at any time, while preventing templates from doing so when
      * configure(Map) is locked.
      */
     protected void configure(ValueParser values)
     {
         super.configure(values);
-        
+
         String listDelim = values.getString(LIST_DELIM_KEY);
         if (listDelim != null)
         {
@@ -281,7 +283,7 @@ public class DisplayTool extends LocaleC
     /**
      * Formats a collection or array into the form
      * "A&lt;delim&gt;B&lt;finaldelim&gt;C".
-     * 
+     *
      * @param list A collection or array.
      * @param delim A String.
      * @param finaldelim A String.
@@ -295,7 +297,7 @@ public class DisplayTool extends LocaleC
     /**
      * Formats a specified property of collection or array of objects into the
      * form "A&lt;delim&gt;B&lt;finaldelim&gt;C".
-     * 
+     *
      * @param list A collection or array.
      * @param delim A String.
      * @param finaldelim A String.
@@ -476,7 +478,7 @@ public class DisplayTool extends LocaleC
      * Limits the string value of 'truncateMe' to the specified max length in
      * characters. If the string gets curtailed, the specified suffix is used as
      * the ending of the truncated string.
-     * 
+     *
      * @param truncateMe The value to be truncated.
      * @param maxLength An int with the maximum length.
      * @param suffix A String.
@@ -491,7 +493,7 @@ public class DisplayTool extends LocaleC
      * Limits the string value of 'truncateMe' to the latest complete word
      * within the specified maxLength. If the string gets curtailed, the
      * specified suffix is used as the ending of the truncated string.
-     * 
+     *
      * @param truncateMe The value to be truncated.
      * @param maxLength An int with the maximum length.
      * @param suffix A String.
@@ -612,7 +614,7 @@ public class DisplayTool extends LocaleC
         else
         {
             return value + space(cellsize - value.length());
-        }    
+        }
     }
 
     /**
@@ -704,7 +706,7 @@ public class DisplayTool extends LocaleC
      */
     public String br(Object obj)
     {
-        if (obj == null) 
+        if (obj == null)
         {
             return null;
         }
@@ -736,7 +738,7 @@ public class DisplayTool extends LocaleC
         {
             return null;
         }
-        
+
         //build list of tags to be used in regex pattern
         StringBuilder allowedTagList = new StringBuilder();
         if (allowedTags != null)
@@ -798,13 +800,13 @@ public class DisplayTool extends LocaleC
         }
         else
         {
-            //if the last letter is capital then we will append capital letters 
+            //if the last letter is capital then we will append capital letters
             boolean isCapital = !singular.substring(singular.length() - 1)
                                 .toLowerCase().equals(singular
                                 .substring(singular.length() - 1));
-            
+
             String word = singular.toLowerCase();
-            
+
             if (word.endsWith("x") || word.endsWith("sh")
                     || word.endsWith("ch") || word.endsWith("s"))
             {

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/EscapeTool.java Sat Sep 29 22:35:00 2018
@@ -72,9 +72,9 @@ import org.apache.velocity.tools.config.
  *  $esc.singleQuote             -&gt; '
  *  $esc.s                       -&gt; '
  *
- *  $esc.newline                 -&gt; 
+ *  $esc.newline                 -&gt;
  *
- *  $esc.n                       -&gt; 
+ *  $esc.n                       -&gt;
  *
  *
  *  $esc.exclamation             -&gt; !
@@ -103,14 +103,16 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.APPLICATION)
 public class EscapeTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = -6063849274118412139L;
+
     public static final String DEFAULT_KEY = "esc";
-    
+
     private String key = DEFAULT_KEY;
 
     /**
      * Does the actual configuration. This is protected, so
      * subclasses may share the same ValueParser and call configure
-     * at any time, while preventing templates from doing so when 
+     * at any time, while preventing templates from doing so when
      * configure(Map) is locked.
      */
     protected void configure(ValueParser values)
@@ -197,7 +199,7 @@ public class EscapeTool extends SafeConf
         }
         return StringEscapeUtils.escapeJava(String.valueOf(string));
     }
-    
+
     /**
      * Escapes the characters in a <code>String</code> using java.util.Properties rules for escaping property keys.
      *
@@ -213,7 +215,7 @@ public class EscapeTool extends SafeConf
         }
         return dumpString(String.valueOf(string), true);
     }
-    
+
     /**
      * Escapes the characters in a <code>String</code> using java.util.Properties rules for escaping property values.
      *
@@ -229,7 +231,7 @@ public class EscapeTool extends SafeConf
         }
         return dumpString(String.valueOf(string), false);
     }
-    
+
     /**
      * This code was pulled from the Apache Harmony project.  See
      * https://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Properties.java
@@ -274,7 +276,7 @@ public class EscapeTool extends SafeConf
             }
         }
         return builder.toString();
-    } 
+    }
 
     /**
      * <p>Escapes the characters in a <code>String</code> using JavaScript String rules.</p>
@@ -413,7 +415,7 @@ public class EscapeTool extends SafeConf
         int codePoint = Integer.valueOf(s, 16);
         return String.valueOf(Character.toChars(codePoint));
     }
-            
+
 
     /**
      * Renders a dollar sign ($).

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ImportTool.java Sat Sep 29 22:35:00 2018
@@ -47,6 +47,8 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.REQUEST)
 public class ImportTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = -6707904279566187527L;
+
     /**
      * ImportSupport utility which provides underlying i/o
      */

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/JsonTool.java Sat Sep 29 22:35:00 2018
@@ -19,18 +19,13 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.Serializable;
 import java.io.StringReader;
-import java.net.URL;
 import java.util.Iterator;
 import java.util.Set;
 
-import org.apache.velocity.tools.ConversionUtils;
-import org.apache.velocity.tools.XmlUtils;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
 import org.json.simple.parser.JSONParser;
@@ -73,6 +68,8 @@ import org.w3c.dom.Node;
 @InvalidScope(Scope.SESSION)
 public class JsonTool extends ImportSupport implements Iterable, Serializable
 {
+    private static final long serialVersionUID = -6239459645862004347L;
+
     /**
      * ImportSupport utility which provides underlying i/o
      */
@@ -91,7 +88,7 @@ public class JsonTool extends ImportSupp
         }
     }
 
-    private JsonContent root = null;    
+    private JsonContent root = null;
 
     /**
      * Looks for the "file" parameter and automatically uses
@@ -212,7 +209,7 @@ public class JsonTool extends ImportSupp
                         reader.close();
                     }
                     catch (IOException ioe) {}
-                }        
+                }
             }
         }
         return this;

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LinkTool.java Sat Sep 29 22:35:00 2018
@@ -59,7 +59,7 @@ import org.apache.velocity.tools.config.
  * <p>The LinkTool is somewhat special in that nearly all public methods return
  * a new instance of LinkTool. This facilitates greatly the repeated use
  * of the LinkTool in Velocity and leads to an elegant syntax.</p>
- * 
+ *
  * <p>Template example(s):</p>
  * <pre>
  *   #set( $base = $link.relative('MyPage.vm').anchor('view') )
@@ -85,6 +85,8 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.REQUEST)
 public class LinkTool extends SafeConfig implements Cloneable, Serializable
 {
+    private static final long serialVersionUID = -9178414982270037545L;
+
     /** Standard HTML delimiter for query data ('&amp;') */
     public static final String HTML_QUERY_DELIMITER = "&";
 
@@ -718,7 +720,7 @@ public class LinkTool extends SafeConfig
     /**
      * Turns the specified key and value into a properly encoded
      * query pair string.  If the value is an array or List, then
-     * this will create a delimited string of query pairs, reusing 
+     * this will create a delimited string of query pairs, reusing
      * the same key for each of the values separately.
      */
     protected String toQuery(Object key, Object value)
@@ -768,7 +770,7 @@ public class LinkTool extends SafeConfig
 
     /**
      * Uses {@link #normalizeQuery} to make all delimiters in the
-     * specified query string match the current query delimiter 
+     * specified query string match the current query delimiter
      * and then uses {@link #parseQuery(String,String)} to parse it
      * according to that same delimiter.
      */

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LogTool.java Sat Sep 29 22:35:00 2018
@@ -22,7 +22,6 @@ import java.io.Serializable;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.ValidScope;
-import org.slf4j.LoggerFactory;
 
 /**
  * <p>
@@ -57,6 +56,8 @@ import org.slf4j.LoggerFactory;
 @ValidScope(Scope.APPLICATION)
 public class LogTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = 2081207016220808266L;
+
     public void error(String message)
     {
         getLog().error(message);

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/LoopTool.java Sat Sep 29 22:35:00 2018
@@ -45,7 +45,7 @@ import org.apache.velocity.tools.config.
  * to understand and use.  Rather than try to migrate that implementation
  * via deprecation and new methods, it was simplest to just create an
  * entirely new tool that simplified the original API and was easy
- * to augment with useful new features like support for nested 
+ * to augment with useful new features like support for nested
  * (and nameable) loops, skipping ahead in loops, synchronizing multiple
  * iterators, getting the iteration count of loops, identifying if a loop is
  * on its first or last iteration, and so on.
@@ -95,6 +95,8 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.REQUEST)
 public class LoopTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = -4760226781390687478L;
+
     private Stack<ManagedIterator> iterators = new Stack<ManagedIterator>();
     private ManagedIterator last;
     private Map<String,Object> lastSyncedValues;
@@ -130,7 +132,7 @@ public class LoopTool extends SafeConfig
      * a name which is given to the {@link ManagedIterator} that is returned.
      * This allows the user to send stop or skip commands to that specific
      * iterator even when there are nested iterators within it that are being
-     * watched.  If the given name is {@code null}, then this will return 
+     * watched.  If the given name is {@code null}, then this will return
      * {@code null} even if the object can be watched. Provided names cannot
      * be {@code null}.
      * @see #watch(Object)
@@ -572,7 +574,7 @@ public class LoopTool extends SafeConfig
 
 
     /**
-     * Wraps access to {@link ClassUtils#getIterator} is a 
+     * Wraps access to {@link ClassUtils#getIterator} is a
      * nice little try/catch block to prevent exceptions from
      * escaping into the template.  In the case of such problems,
      * this will return {@code null}.
@@ -597,7 +599,7 @@ public class LoopTool extends SafeConfig
 
     /**
      * Iterator implementation that wraps a standard {@link Iterator}
-     * and allows it to be prematurely stopped, skipped ahead, and 
+     * and allows it to be prematurely stopped, skipped ahead, and
      * associated with a name for advanced nested loop control.
      * This also allows a arbitrary {@link ActionCondition}s to be added
      * in order to have it automatically skip over or stop before
@@ -921,7 +923,7 @@ public class LoopTool extends SafeConfig
          * name s"synced" (e.g. $loop.synced or $loop.get('synced'))
          * and are automatically updated for each iteration by this instance.
          * </p><p><b>NOTE</b>: if you are sync'ing multiple iterators
-         * with the same managed iterator, you must use 
+         * with the same managed iterator, you must use
          * {@link #sync(Object,String)} or else your the later iterators
          * will simply replace the earlier ones under the default
          * 'synced' key.</p>

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MarkupTool.java Sat Sep 29 22:35:00 2018
@@ -16,7 +16,7 @@ package org.apache.velocity.tools.generi
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.    
+ * under the License.
  */
 
 import java.io.Serializable;
@@ -64,6 +64,8 @@ import org.apache.velocity.tools.config.
 @DefaultKey("mark")
 public class MarkupTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = -777597069616274442L;
+
     public static final String DEFAULT_TAB = "  ";
     public static final String DEFAULT_DELIMITER = " ";
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/MathTool.java Sat Sep 29 22:35:00 2018
@@ -62,7 +62,7 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.APPLICATION)
 public class MathTool extends FormatConfig implements Serializable
 {
-    /* Old non-vararg methods (can be removed once we require Velocity 1.6) */
+    private static final long serialVersionUID = 3207828679772113341L;
 
     public Number add(Object num1, Object num2)
     {

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/NumberTool.java Sat Sep 29 22:35:00 2018
@@ -24,7 +24,6 @@ import java.text.NumberFormat;
 import java.util.Locale;
 
 import org.apache.velocity.tools.ConversionUtils;
-import org.apache.velocity.tools.ToolContext;
 import org.apache.velocity.tools.config.DefaultKey;
 
 /**
@@ -63,6 +62,8 @@ import org.apache.velocity.tools.config.
 @DefaultKey("number")
 public class NumberTool extends FormatConfig implements Serializable
 {
+    private static final long serialVersionUID = -4336524405835332577L;
+
     // ------------------------- formatting methods ---------------------------
 
     /**

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/RenderTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/RenderTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/RenderTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/RenderTool.java Sat Sep 29 22:35:00 2018
@@ -25,7 +25,6 @@ import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.tools.Scope;
-import org.apache.velocity.tools.ToolContext;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.InvalidScope;
 

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ResourceTool.java Sat Sep 29 22:35:00 2018
@@ -26,7 +26,6 @@ import java.util.Enumeration;
 import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
-import org.apache.velocity.tools.ConversionUtils;
 import org.apache.velocity.tools.config.DefaultKey;
 
 /**
@@ -77,6 +76,8 @@ import org.apache.velocity.tools.config.
 @DefaultKey("text")
 public class ResourceTool extends LocaleConfig implements Serializable
 {
+    private static final long serialVersionUID = 7942357727574280447L;
+
     public static final String BUNDLES_KEY = "bundles";
 
     private String[] bundles = new String[] { "resources" };

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/SortTool.java Sat Sep 29 22:35:00 2018
@@ -19,15 +19,6 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.velocity.tools.config.DefaultKey;
 
 /**
@@ -117,4 +108,6 @@ import org.apache.velocity.tools.config.
 @Deprecated
 public class SortTool extends CollectionTool
 {
+
+    private static final long serialVersionUID = -9150476432881809190L;
 }

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java Sat Sep 29 22:35:00 2018
@@ -87,6 +87,8 @@ import org.w3c.dom.Text;
 @DefaultKey("xml")
 public class XmlTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = 8217744660691416595L;
+
     /**
      * ImportSupport utility which provides underlying i/o
      */
@@ -513,7 +515,7 @@ public class XmlTool extends SafeConfig
      * {@link Node}s held by this instance and returns a new
      * {@link XmlTool} instance that wraps those results.
      * If the specified value is null or this instance does
-     * not currently hold any nodes, then this will return 
+     * not currently hold any nodes, then this will return
      * {@code null}.  If the specified value, when converted
      * to a string, does not contain a '/' character, then
      * it has "//" prepended to it.  This means that a call to
@@ -700,7 +702,7 @@ public class XmlTool extends SafeConfig
         return out.toString().trim();
     }
 
-    
+
     /**
      * Iterator implementation that wraps a Node list iterator
      * to return new XmlTool instances for each item in the wrapped

Modified: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/AlternatorToolTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/AlternatorToolTests.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/AlternatorToolTests.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/AlternatorToolTests.java Sat Sep 29 22:35:00 2018
@@ -21,9 +21,7 @@ package org.apache.velocity.tools.generi
 
 import org.junit.*;
 import static org.junit.Assert.*;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import org.apache.velocity.tools.generic.Alternator;
 
@@ -122,4 +120,4 @@ public class AlternatorToolTests {
     }
 
 }
-        
+

Modified: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/DisplayToolTests.java Sat Sep 29 22:35:00 2018
@@ -23,11 +23,9 @@ import org.junit.*;
 import static org.junit.Assert.*;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import org.apache.velocity.tools.generic.ValueParser;
 
 /**
  * <p>Tests for DisplayTool</p>
@@ -212,7 +210,7 @@ public class DisplayToolTests {
         assertEquals("123", display.list(nums, "", ""));
         assertEquals("1; 2 und 3", display.list(nums, "; ", " und "));
     }
-    
+
     public @Test void methodList_ObjectStringStringString() throws Exception
     {
         TestBean bean1 = new TestBean(1, "one");
@@ -221,7 +219,7 @@ public class DisplayToolTests {
         TestBean[] beanArray = new TestBean[] { bean1, bean2, bean3 };
         List<TestBean> beanList = new ArrayList<TestBean>();
         beanList.addAll(Arrays.asList(beanArray));
-        
+
         DisplayTool display = new DisplayTool();
         assertEquals(null, display.list(null, null, null, null));
         assertEquals("1null2null3", display.list(beanArray, null, null, "num"));
@@ -349,7 +347,7 @@ public class DisplayToolTests {
         assertEquals("foob", display.truncate("foobar", 4, null));
         assertEquals("foo>", display.truncate("foobar", 4, ">"));
     }
-    
+
     public @Test void methodTruncate_ObjectintStringboolean() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -369,7 +367,7 @@ public class DisplayToolTests {
         assertEquals("test", display.uncapitalize("Test"));
         assertEquals("tEST", display.uncapitalize("TEST"));
     }
-    
+
     public @Test void methodBr_Object() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -378,7 +376,7 @@ public class DisplayToolTests {
         assertEquals("<br />\n", display.br("\n"));
         assertEquals("line1 <br />\n LINE2", display.br("line1 \n LINE2"));
     }
-    
+
     public @Test void methodStripTags_Object() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -389,7 +387,7 @@ public class DisplayToolTests {
         assertEquals("", display.stripTags(""));
         assertEquals("paragraph link header1 header2 bold", display.stripTags(html));
     }
-    
+
     public @Test void methodStripTags_ObjectStringVarArgs() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -398,14 +396,14 @@ public class DisplayToolTests {
                       + "<br><br/><br  /><b>bold</b>";
         assertEquals(null, display.stripTags(null, (String[])null));
         assertEquals("", display.stripTags("","",""));
-        assertEquals("paragraph link <h1>header1</h1> <h2>header2</h2> bold", 
+        assertEquals("paragraph link <h1>header1</h1> <h2>header2</h2> bold",
                 display.stripTags(html, "h1", "h2"));
-        assertEquals("paragraph <a href=\"url\" target='t'>link</a> header1 header2 bold", 
+        assertEquals("paragraph <a href=\"url\" target='t'>link</a> header1 header2 bold",
                 display.stripTags(html, "a"));
-        assertEquals("paragraph link header1 header2 <br><br/><br  /><b>bold</b>", 
+        assertEquals("paragraph link header1 header2 <br><br/><br  /><b>bold</b>",
                 display.stripTags(html, "b", "", null, "br"));
     }
-    
+
     public @Test void methodPlural_intString() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -419,7 +417,7 @@ public class DisplayToolTests {
         assertEquals("foxes", display.plural(2,"fox"));
         assertEquals("churches", display.plural(2,"church"));
     }
-    
+
     public @Test void methodPlural_intStringString() throws Exception
     {
         DisplayTool display = new DisplayTool();
@@ -432,13 +430,13 @@ public class DisplayToolTests {
     public class TestBean {
         private int num;
         private String str;
-        
+
         public TestBean(int num, String str)
         {
             this.num = num;
             this.str = str;
         }
-        
+
         public int getNum()
         {
             return num;
@@ -457,4 +455,4 @@ public class DisplayToolTests {
         }
     }
 
-}
\ No newline at end of file
+}

Modified: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/JsonToolTests.java Sat Sep 29 22:35:00 2018
@@ -19,7 +19,6 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
-import org.json.simple.JSONArray;
 import org.junit.Test;
 
 import java.util.HashMap;

Modified: velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java (original)
+++ velocity/tools/trunk/velocity-tools-generic/src/test/java/org/apache/velocity/tools/generic/MockLogger.java Sat Sep 29 22:35:00 2018
@@ -16,20 +16,17 @@ package org.apache.velocity.tools.generi
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
- * under the License.    
+ * under the License.
  */
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
-import org.slf4j.Logger;
 import org.slf4j.helpers.FormattingTuple;
 import org.slf4j.helpers.MarkerIgnoringBase;
 import org.slf4j.helpers.MessageFormatter;
 import org.slf4j.spi.LocationAwareLogger;
 
-import org.apache.velocity.runtime.RuntimeServices;
-
 /**
  * Logger implementation that can easily capture output
  * or suppress it entirely.  By default, both capture and suppress
@@ -68,7 +65,7 @@ public class MockLogger extends MarkerIg
             startCapture();
         }
     }
-    
+
     public static final int LOG_LEVEL_TRACE = LocationAwareLogger.TRACE_INT;
     public static final int LOG_LEVEL_DEBUG = LocationAwareLogger.DEBUG_INT;
     public static final int LOG_LEVEL_INFO = LocationAwareLogger.INFO_INT;
@@ -136,7 +133,7 @@ public class MockLogger extends MarkerIg
     {
         return !suppress && level >= enabledLevel;
     }
-            
+
     /**
      * Return the captured log messages to date.
      * @return log messages

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/AbstractSearchTool.java Sat Sep 29 22:35:00 2018
@@ -23,9 +23,6 @@ import java.util.Collections;
 import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.InvalidScope;

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ImportTool.java Sat Sep 29 22:35:00 2018
@@ -48,6 +48,8 @@ import org.apache.velocity.tools.generic
 @ValidScope(Scope.REQUEST)
 public class ImportTool extends org.apache.velocity.tools.generic.ImportTool
 {
+    private static final long serialVersionUID = 9071583951325800486L;
+
     protected synchronized void initializeImportSupport(ValueParser config)
     {
         if (importSupport == null)

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/IncludeTool.java Sat Sep 29 22:35:00 2018
@@ -55,6 +55,8 @@ import org.apache.velocity.tools.generic
 @InvalidScope(Scope.APPLICATION)
 public class IncludeTool extends SafeConfig implements Serializable
 {
+    private static final long serialVersionUID = -1547421197271245152L;
+
     /**
      * The key used to search initialization, context, and JVM
      * parameters for the default language to use.

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JsonTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JsonTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JsonTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/JsonTool.java Sat Sep 29 22:35:00 2018
@@ -21,7 +21,6 @@ package org.apache.velocity.tools.view;
 
 import javax.servlet.ServletRequest;
 
-import org.apache.velocity.tools.generic.ImportSupport;
 import org.apache.velocity.tools.generic.ValueParser;
 
 import org.apache.velocity.tools.Scope;
@@ -42,6 +41,8 @@ import org.apache.velocity.tools.config.
 public class JsonTool extends org.apache.velocity.tools.generic.JsonTool
 {
 
+    private static final long serialVersionUID = -4305396131049004070L;
+
     /**
      * Importsupport initialization
      * @param config

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/LinkTool.java Sat Sep 29 22:35:00 2018
@@ -36,13 +36,13 @@ import org.apache.velocity.tools.view.Se
  *     <li>reconstruct or alter the current request URI</li>
  *     <li>and more..</li>
  * </ul>
- * 
+ *
  * <p>The LinkTool is somewhat special in that nearly all public methods return
  * a new instance of LinkTool. This facilitates greatly the repeated use
  * of the LinkTool in Velocity and leads to an elegant syntax.</p>
- * 
+ *
  * <p>Template example(s):</p><pre>
- * 
+ *
  *   #set( $base = $link.path('MyPage.vm').anchor('view') )
  *   &lt;a href="$base.param('select','this')"&gt;this&lt;/a&gt;
  *   &lt;a href="$base.param('select','that')"&gt;that&lt;/a&gt;
@@ -67,6 +67,8 @@ import org.apache.velocity.tools.view.Se
 
 public class LinkTool extends org.apache.velocity.tools.generic.LinkTool
 {
+    private static final long serialVersionUID = 6814069794929110755L;
+
     public static final String INCLUDE_REQUEST_PARAMS_KEY = "includeRequestParams";
 
     protected HttpServletRequest request;
@@ -84,7 +86,7 @@ public class LinkTool extends org.apache
     @Override
     protected void configure(ValueParser props)
     {
-        // request values override configured defaults 
+        // request values override configured defaults
         //NOTE: not sure this is the most intuitive way in all cases;
         // it might make sense to provide the option of whether req/res
         // values override configured ones or vice versa.
@@ -96,7 +98,7 @@ public class LinkTool extends org.apache
         {
             setIncludeRequestParams(incParams);
         }
-        
+
         // set default/start values from request & response
         this.response =
             (HttpServletResponse)props.getValue(ViewContext.RESPONSE);
@@ -291,7 +293,7 @@ public class LinkTool extends org.apache
 
     /**
      * <p>Returns a URL that addresses the web application. (e.g.
-     * <code>http://myserver.net/myapp/</code>. 
+     * <code>http://myserver.net/myapp/</code>.
      * This essentially just replaces the full path with
      * the {@link #getContextPath()} and removes the anchor and query
      * data.

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ParameterTool.java Sat Sep 29 22:35:00 2018
@@ -22,9 +22,6 @@ package org.apache.velocity.tools.view;
 import java.lang.reflect.Array;
 import java.util.Map;
 import java.util.HashMap;
-import java.util.Collection;
-import java.util.Set;
-import java.util.HashSet;
 import javax.servlet.ServletRequest;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletUtils.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletUtils.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletUtils.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ServletUtils.java Sat Sep 29 22:35:00 2018
@@ -19,11 +19,7 @@ package org.apache.velocity.tools.view;
  * under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.net.MalformedURLException;
 import java.net.URL;

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/UAParser.java Sat Sep 29 22:35:00 2018
@@ -6,7 +6,6 @@ import org.apache.commons.lang3.tuple.Pa
 import org.apache.velocity.tools.ClassUtils;
 
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -27,6 +26,8 @@ public class UAParser
 
     public static class UAEntity implements Serializable
     {
+        private static final long serialVersionUID = 5148646199164619995L;
+
         private String name = null;
         private int majorVersion = -1;
         private int minorVersion = -1;
@@ -35,7 +36,7 @@ public class UAParser
         {
             this(n, maj, min, false);
         }
-        
+
         public UAEntity(String n, String maj, String min, boolean wantsFullVersion)
         {
             name = n;
@@ -139,6 +140,8 @@ public class UAParser
 
     public static class UserAgent implements Serializable
     {
+        private static final long serialVersionUID = 2295189396414933725L;
+
         private DeviceType deviceType = null;
         private UAEntity operatingSystem = null;
         private UAEntity browser = null;
@@ -177,7 +180,7 @@ public class UAParser
             if (deviceType == DeviceType.ROBOT) return;
             renderingEngine = new UAEntity(entity, major, minor);
         }
-        
+
         protected void setDeviceType(DeviceType deviceType)
         {
             this.deviceType = deviceType;

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=1842348&r1=1842347&r2=1842348&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 Sat Sep 29 22:35:00 2018
@@ -24,28 +24,20 @@ import java.io.IOException;
 import java.io.Writer;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.List;
 import java.util.Properties;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
-import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
 
 import org.apache.velocity.util.ExtProperties;
-import org.slf4j.Logger;
 
 import org.apache.velocity.Template;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.exception.ResourceNotFoundException;
 import org.apache.velocity.io.VelocityWriter;
-import org.apache.velocity.runtime.RuntimeConstants;
-import org.apache.velocity.tools.ClassUtils;
-import org.apache.velocity.tools.Scope;
-import org.apache.velocity.tools.Toolbox;
 import org.apache.velocity.tools.ToolboxFactory;
 import org.apache.velocity.tools.config.ConfigurationCleaner;
 import org.apache.velocity.tools.config.ConfigurationUtils;
@@ -98,7 +90,7 @@ public class VelocityView extends ViewTo
 
     /** The HTTP output encoding. */
     public static final String OUTPUT_ENCODING_KEY = "output.encoding";
-    
+
     /**
      * Key used to access the ServletContext in
      * the Velocity application attributes.

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewFilter.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewFilter.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewFilter.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/VelocityViewFilter.java Sat Sep 29 22:35:00 2018
@@ -19,11 +19,9 @@ package org.apache.velocity.tools.view;
  * under the License.
  */
 
-import java.io.IOException;
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
@@ -68,7 +66,7 @@ import org.apache.velocity.tools.view.Vi
  *   <dt>org.apache.velocity.tools.shared.config</dt>
  *   <dd>By default, this is {@code true}. If set to {@code false}, then
  *     the {@link VelocityView} used by this filter will not be shared
- *     with other VelocityViewFilters, {@link VelocityViewServlet}s or 
+ *     with other VelocityViewFilters, {@link VelocityViewServlet}s or
  *     {@link org.apache.velocity.tools.view.jsp.VelocityViewTag}s in the
  *     application.</dd>
  *   <dt>org.apache.velocity.tools.context.key</dt>

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewContextTool.java Sat Sep 29 22:35:00 2018
@@ -55,6 +55,8 @@ import org.apache.velocity.tools.view.Vi
  */
 public class ViewContextTool extends ContextTool
 {
+    private static final long serialVersionUID = -4601239636234865712L;
+
     protected HttpServletRequest request;
     protected HttpSession session;
     protected ServletContext application;

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewImportSupport.java Sat Sep 29 22:35:00 2018
@@ -20,7 +20,6 @@ package org.apache.velocity.tools.view;
  */
 
 import java.io.ByteArrayOutputStream;
-import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.Reader;
@@ -46,7 +45,6 @@ import javax.servlet.http.HttpServletRes
 import org.apache.velocity.tools.Toolbox;
 import org.apache.velocity.tools.generic.ImportSupport;
 import org.apache.velocity.tools.generic.ValueParser;
-import org.slf4j.Logger;
 
 /**
  * <p>Provides methods to import arbitrary local or remote resources as strings.</p>
@@ -195,7 +193,7 @@ public class ViewImportSupport extends I
         url = mergeQueryStrings(url);
         Object parentToolbox = request.getAttribute(Toolbox.KEY);
         request.removeAttribute(Toolbox.KEY);
-        
+
         // from this context, get a dispatcher
         RequestDispatcher rd = application.getRequestDispatcher(url);
         if (rd == null)
@@ -538,7 +536,7 @@ public class ViewImportSupport extends I
             int qm = url.indexOf('?');
             if (qm != -1)
             {
-                
+
                 String[] newParameters = url.substring(qm + 1).split("&");
                 for (String newParam : newParameters)
                 {

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolContext.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolContext.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolContext.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolContext.java Sat Sep 29 22:35:00 2018
@@ -19,9 +19,7 @@ package org.apache.velocity.tools.view;
  * under the License.
  */
 
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
@@ -211,7 +209,7 @@ public class ViewToolContext extends Too
     }
 
     /**
-     * Returns the current matching servlet request, response, session, 
+     * Returns the current matching servlet request, response, session,
      * or servlet context instance, or null if the key matches none of those
      * keys.
      */

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolManager.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolManager.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolManager.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/ViewToolManager.java Sat Sep 29 22:35:00 2018
@@ -31,7 +31,6 @@ import org.apache.velocity.tools.Toolbox
 import org.apache.velocity.tools.ToolboxFactory;
 import org.apache.velocity.tools.ToolContext;
 import org.apache.velocity.tools.ToolManager;
-import org.apache.velocity.tools.config.ConfigurationUtils;
 import org.apache.velocity.tools.config.FactoryConfiguration;
 import org.apache.velocity.tools.view.ServletUtils;
 import org.apache.velocity.tools.view.ViewContext;
@@ -181,7 +180,7 @@ public class ViewToolManager extends Too
     protected void updateGlobalProperties()
     {
         // check for a createSession setting
-        Boolean create = 
+        Boolean create =
             (Boolean)this.factory.getGlobalProperty(CREATE_SESSION_PROPERTY);
         if (create != null)
         {
@@ -189,7 +188,7 @@ public class ViewToolManager extends Too
         }
 
         // check for a publishToolboxes setting
-        Boolean publish = 
+        Boolean publish =
             (Boolean)this.factory.getGlobalProperty(PUBLISH_TOOLBOXES_PROPERTY);
         if (publish != null)
         {
@@ -271,7 +270,7 @@ public class ViewToolManager extends Too
             // put the toolboxes where the ViewToolContext
             // and others can find them
             publishToolboxes(request);
-            
+
             // these would otherwise be done in super.prepareContext
             VelocityEngine engine = getVelocityEngine();
             if (engine != null)

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/XmlTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/XmlTool.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/XmlTool.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/XmlTool.java Sat Sep 29 22:35:00 2018
@@ -35,6 +35,8 @@ import javax.servlet.ServletRequest;
 
 public class XmlTool extends org.apache.velocity.tools.generic.XmlTool
 {
+    private static final long serialVersionUID = 8975478801777360304L;
+
     /**
      * ImportSupport initialization.
      * @param config

Modified: velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/BrowserToolTests.java Sat Sep 29 22:35:00 2018
@@ -26,8 +26,6 @@ import static org.junit.Assert.fail;
 
 import java.io.BufferedReader;
 import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.PrintWriter;
 import java.util.Map;
 import java.util.TreeMap;
 

Modified: velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/VelocityViewTest.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/VelocityViewTest.java?rev=1842348&r1=1842347&r2=1842348&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/VelocityViewTest.java (original)
+++ velocity/tools/trunk/velocity-tools-view/src/test/java/org/apache/velocity/tools/view/VelocityViewTest.java Sat Sep 29 22:35:00 2018
@@ -24,7 +24,6 @@ import static org.easymock.EasyMock.*;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.StringWriter;
 import java.net.URL;
 



Mime
View raw message