jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1690170 - in /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags: LinkTag.java LinkToTag.java MessagesTag.java SetPaginationTag.java TabTag.java UserProfileTag.java
Date Thu, 09 Jul 2015 20:37:03 GMT
Author: juanpablo
Date: Thu Jul  9 20:37:02 2015
New Revision: 1690170

URL: http://svn.apache.org/r1690170
Log:
StringBuffer -> StringBuilder

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkToTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/MessagesTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SetPaginationTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/TabTag.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/UserProfileTag.java

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=1690170&r1=1690169&r2=1690170&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 Thu Jul  9 20:37:02
2015
@@ -422,7 +422,7 @@ public class LinkTag extends WikiLinkTag
             JspWriter out = pageContext.getOut();
             String url = figureOutURL();
 
-            StringBuffer sb = new StringBuffer( 20 );
+            StringBuilder sb = new StringBuilder( 20 );
 
             sb.append( (m_class != null)   ? "class=\""+m_class+"\" " : "" );
             sb.append( (m_style != null)   ? "style=\""+m_style+"\" " : "" );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkToTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkToTag.java?rev=1690170&r1=1690169&r2=1690170&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkToTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/LinkToTag.java Thu Jul  9
20:37:02 2015
@@ -19,6 +19,7 @@
 package org.apache.wiki.tags;
 
 import java.io.IOException;
+
 import javax.servlet.jsp.JspWriter;
 
 import org.apache.wiki.WikiContext;
@@ -110,7 +111,7 @@ public class LinkToTag
         }
         else
         {
-            StringBuffer params = new StringBuffer();
+        	StringBuilder params = new StringBuilder();
             if( getVersion() != null ) params.append( "version="+getVersion() );
             if( getTemplate() != null ) params.append( (params.length()>0?"&":"")
+ "skin="+getTemplate() );
 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/MessagesTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/MessagesTag.java?rev=1690170&r1=1690169&r2=1690170&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/MessagesTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/MessagesTag.java Thu Jul
 9 20:37:02 2015
@@ -99,7 +99,7 @@ public class MessagesTag extends WikiTag
             String[] messages = ( m_topic == null ) ? session.getMessages() : session.getMessages(
m_topic );
             if ( messages.length > 0 )
             {
-                StringBuffer sb = new StringBuffer();
+            	StringBuilder sb = new StringBuilder();
                 if ( messages.length == 1 )
                 {
                     sb.append( "<div class=\"" + m_div + "\">" + m_prefix + TextUtil.replaceEntities(messages[0])
+ "</div>" );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SetPaginationTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SetPaginationTag.java?rev=1690170&r1=1690169&r2=1690170&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SetPaginationTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/SetPaginationTag.java Thu
Jul  9 20:37:02 2015
@@ -127,7 +127,7 @@ public class SetPaginationTag
     {
         if( m_total <= m_pagesize ) return SKIP_BODY;
 
-        StringBuffer pagination = new StringBuffer();
+        StringBuilder pagination = new StringBuilder();
 
         if( m_start > m_total ) m_start = m_total;
         if( m_start < ALLITEMS ) m_start = 0;
@@ -226,20 +226,20 @@ public class SetPaginationTag
      * Uses m_href and m_onclick as attribute patterns
      * '%s' in the patterns are replaced with page offset
      *
-     * @param sb  : stringbuffer to write output to
+     * @param sb  : stringbuilder to write output to
      * @param page : start of page block
      * @param onclick : link text
      *
      **/
-    private void appendLink( StringBuffer sb, int page, String fmttextkey )
+    private void appendLink( StringBuilder sb, int page, String fmttextkey )
     {
         appendLink2( sb, page, LocaleSupport.getLocalizedMessage( pageContext, fmttextkey
) );
     }
-    private void appendLink( StringBuffer sb, int page, int paginationblock )
+    private void appendLink( StringBuilder sb, int page, int paginationblock )
     {
         appendLink2( sb, page, Integer.toString( paginationblock ) );
     }
-    private void appendLink2( StringBuffer sb, int page, String text )
+    private void appendLink2( StringBuilder sb, int page, String text )
     {
         sb.append( "<a title=\"" );
         if( page == ALLITEMS )

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/TabTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/TabTag.java?rev=1690170&r1=1690169&r2=1690170&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/TabTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/TabTag.java Thu Jul  9 20:37:02
2015
@@ -19,6 +19,8 @@
 
 package org.apache.wiki.tags;
 
+import java.io.IOException;
+
 import javax.servlet.jsp.JspTagException;
 
 import org.apache.wiki.util.TextUtil;
@@ -129,7 +131,7 @@ public class TabTag extends WikiTagBase
 
         if( !parent.isStateGenerateTabBody() ) return SKIP_BODY;
 
-        StringBuffer sb = new StringBuffer(32);
+        StringBuilder sb = new StringBuilder(32);
 
         sb.append( "<div id=\""+ getId() + "\"" );
 
@@ -154,11 +156,11 @@ public class TabTag extends WikiTagBase
     /**
      * {@inheritDoc}
      */
-    public int doEndTag() throws javax.servlet.jsp.JspTagException
+    public int doEndTag() throws JspTagException
     {
         TabbedSectionTag parent=(TabbedSectionTag)findAncestorWithClass( this, TabbedSectionTag.class
);
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         if( parent.isStateFindDefaultTab() )
         {
@@ -199,7 +201,7 @@ public class TabTag extends WikiTagBase
         {
             pageContext.getOut().write( sb.toString() );
         }
-        catch( java.io.IOException e )
+        catch( IOException e )
         {
             throw new JspTagException( "IO Error: " + e.getMessage() );
         }

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/UserProfileTag.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/UserProfileTag.java?rev=1690170&r1=1690169&r2=1690170&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/UserProfileTag.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/tags/UserProfileTag.java Thu Jul
 9 20:37:02 2015
@@ -234,7 +234,7 @@ public class UserProfileTag extends Wiki
             return rb.getString("userprofile.nogroups");
         }
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for ( int i = 0; i < tempRoles.size(); i++ )
         {
             String name = tempRoles.get( i );
@@ -275,7 +275,7 @@ public class UserProfileTag extends Wiki
             return rb.getString( "userprofile.noroles" );
         }
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for ( int i = 0; i < tempRoles.size(); i++ )
         {
             String name = tempRoles.get( i );



Mime
View raw message