jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1554250 - /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/
Date Mon, 30 Dec 2013 15:09:58 GMT
Author: juanpablo
Date: Mon Dec 30 15:09:58 2013
New Revision: 1554250

URL: http://svn.apache.org/r1554250
Log:
each tag class uses its own private static final logger

added some missing serialVersionUID

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/CalendarTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/EditorTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/HasAttachmentsTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IncludeTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertDiffTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertPageTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IteratorTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PageSizeTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PluginTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SearchResultIteratorTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiBodyTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiLinkTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiTagBase.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/CalendarTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/CalendarTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/CalendarTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/CalendarTag.java Mon Dec
30 15:09:58 2013
@@ -27,6 +27,7 @@ import java.text.ParseException;
 import javax.servlet.jsp.JspWriter;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiPage;
 import org.apache.wiki.WikiContext;
@@ -52,11 +53,10 @@ import org.apache.wiki.util.TextUtil;
  */
 
 // FIXME: This class is extraordinarily lacking.
+public class CalendarTag extends WikiTagBase {
 
-public class CalendarTag
-    extends WikiTagBase
-{
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( CalendarTag.class );
     
     private SimpleDateFormat m_pageFormat = null;
     private SimpleDateFormat m_urlFormat = null;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java Mon Dec 30
15:09:58 2013
@@ -18,14 +18,17 @@
  */
 package org.apache.wiki.tags;
 
-import java.util.*;
 import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
 
-import javax.servlet.jsp.JspException;
 import javax.servlet.ServletException;
+import javax.servlet.jsp.JspException;
 
+import org.apache.log4j.Logger;
+import org.apache.wiki.WikiContext;
 import org.apache.wiki.api.exceptions.ProviderException;
-import org.apache.wiki.*;
+
 
 /**
  *  Is used as a "super include" tag, which can include the proper context
@@ -33,10 +36,10 @@ import org.apache.wiki.*;
  *
  *  @since 2.2
  */
-public class ContentTag
-    extends WikiTagBase
-{
+public class ContentTag extends WikiTagBase {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( ContentTag.class );
     
     private Map<String, String> m_mappings = new HashMap<String, String>();
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/EditorTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/EditorTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/EditorTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/EditorTag.java Mon Dec 30
15:09:58 2013
@@ -23,9 +23,11 @@ import java.io.IOException;
 import javax.servlet.ServletException;
 import javax.servlet.jsp.JspException;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.ui.EditorManager;
 
+
 /**
  *  Creates an editor component with all the necessary parts
  *  to get it working.
@@ -35,10 +37,10 @@ import org.apache.wiki.ui.EditorManager;
  *
  *  @since 2.2
  */
-public class EditorTag
-    extends WikiBodyTag
-{
+public class EditorTag extends WikiBodyTag {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( EditorTag.class );
     
     public final int doWikiStartTag()
         throws IOException

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/HasAttachmentsTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/HasAttachmentsTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/HasAttachmentsTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/HasAttachmentsTag.java Mon
Dec 30 15:09:58 2013
@@ -20,20 +20,22 @@ package org.apache.wiki.tags;
 
 import java.io.IOException;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiPage;
 import org.apache.wiki.api.exceptions.ProviderException;
 import org.apache.wiki.attachment.AttachmentManager;
 
+
 /**
  *  Includes body if page has attachments.
  *
  *  @since 2.0
  */
-public class HasAttachmentsTag
-    extends WikiTagBase
-{
+public class HasAttachmentsTag extends WikiTagBase {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( HasAttachmentsTag.class );
     
     public final int doWikiStartTag()
         throws IOException

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IncludeTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IncludeTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IncludeTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IncludeTag.java Mon Dec 30
15:09:58 2013
@@ -23,6 +23,7 @@ import java.io.IOException;
 import javax.servlet.jsp.JspException;
 import javax.servlet.ServletException;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.api.exceptions.ProviderException;
 import org.apache.wiki.util.TextUtil;
 
@@ -33,10 +34,10 @@ import org.apache.wiki.util.TextUtil;
  *  @since 2.0
  */
 // FIXME: Perhaps unnecessary?
-public class IncludeTag
-    extends WikiTagBase
-{
+public class IncludeTag extends WikiTagBase {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( IncludeTag.class );
     
     protected String m_page;
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertDiffTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertDiffTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertDiffTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertDiffTag.java Mon Dec
30 15:09:58 2013
@@ -23,6 +23,7 @@ import java.io.IOException;
 import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.PageContext;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiEngine;
 
@@ -37,10 +38,10 @@ import org.apache.wiki.WikiEngine;
  *
  *  @since 2.0
  */
-public class InsertDiffTag
-    extends WikiTagBase
-{
+public class InsertDiffTag extends WikiTagBase {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( InsertDiffTag.class );
     
     /** Attribute which is used to store the old page content to the Page Context */
     public static final String ATTR_OLDVERSION = "olddiff";

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertPageTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertPageTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertPageTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/InsertPageTag.java Mon Dec
30 15:09:58 2013
@@ -22,6 +22,7 @@ import java.io.IOException;
 
 import javax.servlet.jsp.JspWriter;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiPage;
 import org.apache.wiki.api.exceptions.ProviderException;
@@ -47,10 +48,10 @@ import org.apache.wiki.api.exceptions.Pr
  *
  *  @since 2.0
  */
-public class InsertPageTag
-    extends WikiTagBase
-{
+public class InsertPageTag extends WikiTagBase {
+
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( InsertPageTag.class );
     
     public static final int HTML  = 0;
     public static final int PLAIN = 1;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IteratorTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IteratorTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IteratorTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/IteratorTag.java Mon Dec
30 15:09:58 2013
@@ -20,18 +20,19 @@ package org.apache.wiki.tags;
 
 import java.io.IOException;
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.Collection;
+import java.util.Iterator;
+
 import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 import javax.servlet.jsp.tagext.TryCatchFinally;
-import javax.servlet.jsp.PageContext;
 
 import org.apache.log4j.Logger;
-
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiPage;
 
+
 /**
  *  Iterates through tags.
  *
@@ -42,16 +43,14 @@ import org.apache.wiki.WikiPage;
  *
  *  @since 2.0
  */
-public abstract class IteratorTag
-    extends BodyTagSupport
-    implements TryCatchFinally
-{
+public abstract class IteratorTag extends BodyTagSupport implements TryCatchFinally {
 
-    protected String      m_pageName;
+	private static final long serialVersionUID = 8945334759300595321L;
+	protected String      m_pageName;
     protected Iterator    m_iterator;
     protected WikiContext m_wikiContext;
 
-    private static Logger log = Logger.getLogger( IteratorTag.class );
+    private static final Logger log = Logger.getLogger( IteratorTag.class );
 
     /**
      *  Sets the collection that is used to form the iteration.

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java Mon Dec 30 15:09:58
2013
@@ -27,6 +27,7 @@ import javax.servlet.jsp.JspWriter;
 import javax.servlet.jsp.tagext.BodyContent;
 import javax.servlet.jsp.tagext.BodyTag;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiPage;
@@ -48,11 +49,10 @@ import org.apache.wiki.util.TextUtil;
  *  <p>
  *  @since 2.3.50
  */
-public class LinkTag
-    extends WikiLinkTag
-    implements ParamHandler, BodyTag
-{
-    static final long serialVersionUID = 0L;
+public class LinkTag extends WikiLinkTag implements ParamHandler, BodyTag {
+    
+	static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( LinkTag.class );
 
     private String m_version = null;
     private String m_class   = null;
@@ -312,19 +312,19 @@ public class LinkTag
         return url;
     }
 
-    private String addParamsForRecipient( String addTo, Map params )
+    private String addParamsForRecipient( String addTo, Map< String, String > params
)
     {
         if( params == null || params.size() == 0 )
         {
             return addTo;
         }
-        StringBuffer buf = new StringBuffer();
-        Iterator it = params.entrySet().iterator();
+        StringBuilder buf = new StringBuilder();
+        Iterator< Map.Entry< String, String > > it = params.entrySet().iterator();
         while( it.hasNext() )
         {
-            Map.Entry e = (Map.Entry) it.next();
-            String n = (String)e.getKey();
-            String v = (String)e.getValue();
+            Map.Entry< String, String > e = it.next();
+            String n = e.getKey();
+            String v = e.getValue();
             buf.append( n );
             buf.append( "=" );
             buf.append( v );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PageSizeTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PageSizeTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PageSizeTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PageSizeTag.java Mon Dec
30 15:09:58 2013
@@ -20,6 +20,7 @@ package org.apache.wiki.tags;
 
 import java.io.IOException;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.WikiPage;
 import org.apache.wiki.api.exceptions.ProviderException;
@@ -33,6 +34,7 @@ public class PageSizeTag
     extends WikiTagBase
 {
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( PageSizeTag.class );
     
     public final int doWikiStartTag()
         throws IOException

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PluginTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PluginTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PluginTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/PluginTag.java Mon Dec 30
15:09:58 2013
@@ -24,6 +24,7 @@ import java.util.Map;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyContent;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.api.engine.PluginManager;
 import org.apache.wiki.api.exceptions.PluginException;
@@ -43,6 +44,7 @@ public class PluginTag
     extends WikiBodyTag
 {
     private static final long serialVersionUID = 0L;
+    private static final Logger log = Logger.getLogger( PluginTag.class );
     
     private String m_plugin;
     private String m_args;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SearchResultIteratorTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SearchResultIteratorTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SearchResultIteratorTag.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SearchResultIteratorTag.java
Mon Dec 30 15:09:58 2013
@@ -53,7 +53,7 @@ public class SearchResultIteratorTag
     private   int         m_count = 0;
     private   int         m_start = 0;
     
-    static Logger log = Logger.getLogger(SearchResultIteratorTag.class);
+    private static final Logger log = Logger.getLogger(SearchResultIteratorTag.class);
     
     public void release()
     {

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiBodyTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiBodyTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiBodyTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiBodyTag.java Mon Dec
30 15:09:58 2013
@@ -29,17 +29,16 @@ import org.apache.log4j.Logger;
 
 import org.apache.wiki.WikiContext;
 
+
 /**
  *  This is a class that provides the same services as the WikiTagBase, but this time it
  *   works for the BodyTagSupport base class.
- * 
- *
  */
-public abstract class WikiBodyTag extends BodyTagSupport
-    implements TryCatchFinally
-{
-    protected WikiContext m_wikiContext;
-    static    Logger    log = Logger.getLogger( WikiBodyTag.class );
+public abstract class WikiBodyTag extends BodyTagSupport implements TryCatchFinally {
+
+	private static final long serialVersionUID = -6732266865112847897L;
+	protected WikiContext m_wikiContext;
+    private static final Logger log = Logger.getLogger( WikiBodyTag.class );
 
     public int doStartTag() throws JspException
     {

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiLinkTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiLinkTag.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiLinkTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiLinkTag.java Mon Dec
30 15:09:58 2013
@@ -36,10 +36,10 @@ import java.io.IOException;
  *
  *  @since 2.0
  */
-public abstract class WikiLinkTag
-    extends WikiTagBase
-{
-    public static final int   ANCHOR = 0;
+public abstract class WikiLinkTag extends WikiTagBase {
+
+	private static final long serialVersionUID = 4130732879352134867L;
+	public static final int   ANCHOR = 0;
     public static final int   URL    = 1;
 
     protected String m_pageName;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiTagBase.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiTagBase.java?rev=1554250&r1=1554249&r2=1554250&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiTagBase.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/WikiTagBase.java Mon Dec
30 15:09:58 2013
@@ -45,7 +45,7 @@ public abstract class WikiTagBase
 
     public static final String ATTR_CONTEXT = "jspwiki.context";
 
-    static    Logger    log = Logger.getLogger( WikiTagBase.class );
+    private static final Logger log = Logger.getLogger( WikiTagBase.class );
 
     protected WikiContext m_wikiContext;
 



Mime
View raw message