velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1834388 - in /velocity/tools/trunk: velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/ velocity-tools-view/src/main/java/org/apache/velocity/tools/view/
Date Tue, 26 Jun 2018 01:47:59 GMT
Author: cbrisson
Date: Tue Jun 26 01:47:59 2018
New Revision: 1834388

URL: http://svn.apache.org/viewvc?rev=1834388&view=rev
Log:
[tools] Have some more tools be serializable

Modified:
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.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/ContextTool.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/RenderTool.java
    velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/XmlTool.java
    velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java

Modified: velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java?rev=1834388&r1=1834387&r2=1834388&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java
(original)
+++ velocity/tools/trunk/velocity-tools-generic/src/main/java/org/apache/velocity/tools/generic/AlternatorTool.java
Tue Jun 26 01:47:59 2018
@@ -19,8 +19,8 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Collection;
-
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.ValidScope;
@@ -63,7 +63,7 @@ import org.apache.velocity.tools.config.
 @ValidScope(Scope.APPLICATION)
 @DefaultKey("alternator")
 @Deprecated
-public class AlternatorTool extends SafeConfig
+public class AlternatorTool extends SafeConfig implements Serializable
 {
     public static final String AUTO_ALTERNATE_DEFAULT_KEY = "autoAlternate";
 

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -115,7 +115,7 @@ import java.util.Map;
  * @version $Id$
  */
 @DefaultKey("collection")
-public class CollectionTool extends SafeConfig
+public class CollectionTool extends SafeConfig implements Serializable
 {
     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/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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -57,7 +58,7 @@ import org.apache.velocity.tools.generic
  */
 @DefaultKey("context")
 @InvalidScope({Scope.APPLICATION,Scope.SESSION})
-public class ContextTool extends SafeConfig
+public class ContextTool extends SafeConfig implements Serializable
 {
     protected Context context;
     protected Map<String,Object> toolbox;

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.    
  */
 
+import java.io.Serializable;
 import java.lang.reflect.Array;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -75,7 +76,7 @@ import org.apache.velocity.tools.config.
 
 @DefaultKey("display")
 @ValidScope(Scope.APPLICATION)
-public class DisplayTool extends LocaleConfig
+public class DisplayTool extends LocaleConfig implements Serializable
 {
     public static final String LIST_DELIM_KEY = "listDelim";
     public static final String LIST_FINAL_DELIM_KEY = "listFinalDelim";

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,10 +19,10 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.net.URLDecoder;
-
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
@@ -101,7 +101,7 @@ import org.apache.velocity.tools.config.
 
 @DefaultKey("esc")
 @ValidScope(Scope.APPLICATION)
-public class EscapeTool extends SafeConfig
+public class EscapeTool extends SafeConfig implements Serializable
 {
     public static final String DEFAULT_KEY = "esc";
     

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import org.apache.velocity.tools.Scope;
 import org.apache.velocity.tools.config.DefaultKey;
 import org.apache.velocity.tools.config.ValidScope;
@@ -44,12 +45,12 @@ import org.apache.velocity.tools.config.
 
 @DefaultKey("import")
 @ValidScope(Scope.REQUEST)
-public class ImportTool extends SafeConfig
+public class ImportTool extends SafeConfig implements Serializable
 {
     /**
      * ImportSupport utility which provides underlying i/o
      */
-    protected ImportSupport importSupport = null;
+    protected transient ImportSupport importSupport = null;
 
     /**
      * Importsupport initialization

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -23,6 +23,7 @@ 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;
@@ -70,12 +71,12 @@ import org.w3c.dom.Node;
 // JSONObject isn't (yet?) Serializable, so session scope is invalid
 @DefaultKey("json")
 @InvalidScope(Scope.SESSION)
-public class JsonTool extends ImportSupport implements Iterable
+public class JsonTool extends ImportSupport implements Iterable, Serializable
 {
     /**
      * ImportSupport utility which provides underlying i/o
      */
-    protected ImportSupport importSupport = null;
+    protected transient ImportSupport importSupport = null;
 
     /**
      * ImportSupport initialization

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Array;
 import java.net.URI;
@@ -82,7 +83,7 @@ import org.apache.velocity.tools.config.
 @DefaultKey("link")
 @SkipSetters
 @ValidScope(Scope.REQUEST)
-public class LinkTool extends SafeConfig implements Cloneable
+public class LinkTool extends SafeConfig implements Cloneable, Serializable
 {
     /** Standard HTML delimiter for query data ('&amp;') */
     public static final String HTML_QUERY_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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -18,10 +18,10 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+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;
 
 /**
@@ -55,7 +55,7 @@ import org.slf4j.LoggerFactory;
 
 @DefaultKey("log")
 @ValidScope(Scope.APPLICATION)
-public class LogTool extends SafeConfig
+public class LogTool extends SafeConfig implements Serializable
 {
     public void error(String 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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -92,7 +93,7 @@ import org.apache.velocity.tools.config.
 
 @DefaultKey("loop")
 @ValidScope(Scope.REQUEST)
-public class LoopTool extends SafeConfig
+public class LoopTool extends SafeConfig implements Serializable
 {
     private Stack<ManagedIterator> iterators = new Stack<ManagedIterator>();
     private ManagedIterator last;

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.generi
  * under the License.    
  */
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -61,7 +62,7 @@ import org.apache.velocity.tools.config.
  * @version $Id$
  */
 @DefaultKey("mark")
-public class MarkupTool extends SafeConfig
+public class MarkupTool extends SafeConfig implements Serializable
 {
     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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -19,10 +19,10 @@ package org.apache.velocity.tools.generi
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
-
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.velocity.tools.ConversionUtils;
 import org.apache.velocity.tools.Scope;
@@ -60,7 +60,7 @@ import org.apache.velocity.tools.config.
 
 @DefaultKey("math")
 @ValidScope(Scope.APPLICATION)
-public class MathTool extends FormatConfig
+public class MathTool extends FormatConfig implements Serializable
 {
     /* Old non-vararg methods (can be removed once we require Velocity 1.6) */
 

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -20,7 +20,6 @@ package org.apache.velocity.tools.generi
  */
 
 import java.io.StringWriter;
-
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;

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=1834388&r1=1834387&r2=1834388&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
Tue Jun 26 01:47:59 2018
@@ -90,7 +90,7 @@ public class XmlTool extends SafeConfig
     /**
      * ImportSupport utility which provides underlying i/o
      */
-    protected ImportSupport importSupport = null;
+    protected transient ImportSupport importSupport = null;
 
     /**
      * ImportSupport initialization

Modified: velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java?rev=1834388&r1=1834387&r2=1834388&view=diff
==============================================================================
--- velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
(original)
+++ velocity/tools/trunk/velocity-tools-view/src/main/java/org/apache/velocity/tools/view/BrowserTool.java
Tue Jun 26 01:47:59 2018
@@ -19,6 +19,7 @@ package org.apache.velocity.tools.view;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.*;
@@ -92,7 +93,7 @@ import javax.servlet.http.HttpServletReq
 
 @DefaultKey("browser")
 @InvalidScope(Scope.APPLICATION)
-public class BrowserTool extends BrowserToolDeprecatedMethods implements java.io.Serializable
+public class BrowserTool extends BrowserToolDeprecatedMethods implements Serializable
 {
     private static final long serialVersionUID = 1734529350532353339L;
 



Mime
View raw message