roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1546778 - in /roller/trunk/app/src: main/java/org/apache/roller/planet/business/jpa/ main/java/org/apache/roller/planet/pojos/ main/java/org/apache/roller/util/ main/java/org/apache/roller/weblogger/business/ main/java/org/apache/roller/we...
Date Sun, 01 Dec 2013 04:58:08 GMT
Author: gmazza
Date: Sun Dec  1 04:58:07 2013
New Revision: 1546778

URL: http://svn.apache.org/r1546778
Log:
Switched from StringBuffer to faster StringBuilder except in cases where 3rd party libraries required the former.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/planet/business/jpa/JPAPlanetManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/SubscriptionEntry.java
    roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java
    roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/AbstractURLStrategy.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/business/PlanetURLStrategy.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/LdapCommentAuthenticator.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/MathCommentAuthenticator.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/RollerMessages.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java
    roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/BookmarkTest.java
    roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/rendering/util/CommentValidatorTest.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/business/jpa/JPAPlanetManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/business/jpa/JPAPlanetManagerImpl.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/business/jpa/JPAPlanetManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/business/jpa/JPAPlanetManagerImpl.java Sun Dec  1 04:58:07 2013
@@ -280,7 +280,7 @@ public class JPAPlanetManagerImpl extend
         try {
             long startTime = System.currentTimeMillis();
             
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             List params = new ArrayList();
             int size = 0;
             sb.append("SELECT e FROM SubscriptionEntry e ");

Modified: roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/SubscriptionEntry.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/SubscriptionEntry.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/SubscriptionEntry.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/planet/pojos/SubscriptionEntry.java Sun Dec  1 04:58:07 2013
@@ -234,7 +234,7 @@ public class SubscriptionEntry implement
     }
 
     public void setCategoriesString(List categories) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         Iterator cats = categories.iterator();
         while (cats.hasNext()) {
             String cat = (String)cats.next();

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/DateUtil.java Sun Dec  1 04:58:07 2013
@@ -498,7 +498,7 @@ public abstract class DateUtil {
         // to make it a valid ISO-8601 date.
         
         String str = format(date, getIso8601DateFormat());
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append( str.substring(0,str.length()-2) );
         sb.append( ":" );
         sb.append( str.substring(str.length()-2) );

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/PropertyExpander.java Sun Dec  1 04:58:07 2013
@@ -63,7 +63,7 @@ public final class PropertyExpander {
         }
         
         Matcher matcher = EXPANSION_PATTERN.matcher(input);
-        
+
         StringBuffer expanded = new StringBuffer(input.length());
         while (matcher.find()) {
             String propName = matcher.group(2);

Modified: roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/util/RegexUtil.java Sun Dec  1 04:58:07 2013
@@ -100,7 +100,7 @@ public final class RegexUtil {
      * @return
      */
     public static String encode(String email) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         try {
             char[] hexString = Hex.encodeHex(email.getBytes("UTF-8"));
             for (int i = 0; i < hexString.length; i++) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/AbstractURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/AbstractURLStrategy.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/AbstractURLStrategy.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/AbstractURLStrategy.java Sun Dec  1 04:58:07 2013
@@ -37,8 +37,8 @@ public abstract class AbstractURLStrateg
      * Url to login page.
      */
     public String getLoginURL(boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -56,8 +56,8 @@ public abstract class AbstractURLStrateg
      * Url to logout page.
      */
     public String getLogoutURL(boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -74,8 +74,8 @@ public abstract class AbstractURLStrateg
      * Url to register page.
      */
     public String getRegisterURL(boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -98,8 +98,8 @@ public abstract class AbstractURLStrateg
                                             String weblogHandle,
                                             Map<String, String> parameters,
                                             boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -111,7 +111,7 @@ public abstract class AbstractURLStrateg
         url.append("/").append(action).append(".rol");
         
         // put weblog handle parameter, if necessary
-        Map<String, String> params = new HashMap();
+        Map<String, String> params = new HashMap<String, String>();
         if(weblogHandle != null) {
             params.put("weblog", weblogHandle);
         }
@@ -134,8 +134,8 @@ public abstract class AbstractURLStrateg
      */
     public String getEntryAddURL(String weblogHandle,
                                               boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -158,8 +158,8 @@ public abstract class AbstractURLStrateg
     public String getEntryEditURL(String weblogHandle,
                                                String entryId,
                                                boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -182,8 +182,8 @@ public abstract class AbstractURLStrateg
      */
     public String getWeblogConfigURL(String weblogHandle,
                                                   boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -201,8 +201,8 @@ public abstract class AbstractURLStrateg
     
     
     public String getXmlrpcURL(boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -217,8 +217,8 @@ public abstract class AbstractURLStrateg
     
     
     public String getAtomProtocolURL(boolean absolute) {
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/PreviewURLStrategy.java Sun Dec  1 04:58:07 2013
@@ -51,7 +51,7 @@ public class PreviewURLStrategy extends 
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -87,8 +87,8 @@ public class PreviewURLStrategy extends 
         if(weblog == null) {
             return null;
         }
-        
-        StringBuffer url = new StringBuffer();
+
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());
@@ -128,8 +128,8 @@ public class PreviewURLStrategy extends 
         if(weblog == null) {
             return null;
         }
-        
-        StringBuffer pathinfo = new StringBuffer();
+
+        StringBuilder pathinfo = new StringBuilder();
         Map params = new HashMap();
         
         if(absolute) {
@@ -198,7 +198,7 @@ public class PreviewURLStrategy extends 
             return null;
         }
         
-        StringBuffer pathinfo = new StringBuffer();
+        StringBuilder pathinfo = new StringBuilder();
         Map params = new HashMap();
         
         if(absolute) {
@@ -252,7 +252,7 @@ public class PreviewURLStrategy extends 
             return null;
         }
         
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         
         if(absolute) {
             url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPARefererManagerImpl.java Sun Dec  1 04:58:07 2013
@@ -657,14 +657,14 @@ public class JPARefererManagerImpl imple
 
     protected List getBlackListedReferer(String[] blacklist) throws
             WebloggerException {
-        StringBuffer queryString = getQueryStringForBlackList(blacklist);
+        StringBuilder queryString = getQueryStringForBlackList(blacklist);
         Query query = strategy.getDynamicQuery(queryString.toString());
         return (List) query.getResultList();
     }
 
     protected List getBlackListedReferer(Weblog website, String[] blacklist) 
             throws WebloggerException {
-        StringBuffer queryString = getQueryStringForBlackList(blacklist);
+        StringBuilder queryString = getQueryStringForBlackList(blacklist);
         queryString.append(" AND r.website = ?1 ");
         Query query = strategy.getDynamicQuery(queryString.toString());
         query.setParameter(1, website);
@@ -678,9 +678,9 @@ public class JPARefererManagerImpl imple
      * @param blacklist
      * @return
      */
-    private StringBuffer getQueryStringForBlackList(String[] blacklist) {
+    private StringBuilder getQueryStringForBlackList(String[] blacklist) {
         assert blacklist.length > 0;
-        StringBuffer queryString = new StringBuffer("SELECT r FROM WeblogReferrer r WHERE (");
+        StringBuilder queryString = new StringBuilder("SELECT r FROM WeblogReferrer r WHERE (");
         //Search for any matching entry from blacklist[]
         final String orKeyword = " OR ";
         for (int i = 0; i < blacklist.length; i++) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAUserManagerImpl.java Sun Dec  1 04:58:07 2013
@@ -206,8 +206,8 @@ public class JPAUserManagerImpl implemen
 
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();
-        StringBuffer whereClause = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
+        StringBuilder whereClause = new StringBuilder();
 
         if (weblog != null) {
             queryString.append("SELECT u FROM User u JOIN u.permissions p ");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogEntryManagerImpl.java Sun Dec  1 04:58:07 2013
@@ -419,8 +419,8 @@ public class JPAWeblogEntryManagerImpl i
         
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();
-        StringBuffer whereClause = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
+        StringBuilder whereClause = new StringBuilder();
         queryString.append("SELECT e FROM WeblogEntry e WHERE ");
                      
         params.add(size++, current.getWebsite());
@@ -553,7 +553,7 @@ public class JPAWeblogEntryManagerImpl i
         
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
         
         //queryString.append("SELECT e FROM WeblogEntry e WHERE ");
         if (tags == null || tags.size()==0) {
@@ -891,10 +891,10 @@ public class JPAWeblogEntryManagerImpl i
         
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
         queryString.append("SELECT c FROM WeblogEntryComment c ");
         
-        StringBuffer whereClause = new StringBuffer();
+        StringBuilder whereClause = new StringBuilder();
         if (entry != null) {
             params.add(size++, entry);
             whereClause.append("c.weblogEntry = ?").append(size);
@@ -1358,7 +1358,7 @@ public class JPAWeblogEntryManagerImpl i
                 
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();            
+        StringBuilder queryString = new StringBuilder();
         queryString.append("SELECT w.name, SUM(w.total) FROM WeblogEntryTagAggregate w WHERE ");
                 
         if (website != null) {
@@ -1421,7 +1421,7 @@ public class JPAWeblogEntryManagerImpl i
             return false;
         }
         
-        StringBuffer queryString = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
         queryString.append("SELECT DISTINCT w.name ");
         queryString.append("FROM WeblogEntryTagAggregate w WHERE w.name IN (");
         //?1) AND w.weblog = ?2");
@@ -1725,7 +1725,7 @@ public class JPAWeblogEntryManagerImpl i
      * @param expression The given expression
      * @return the whereClause.
      */
-    private static StringBuffer appendConjuctionToWhereclause(StringBuffer whereClause,
+    private static StringBuilder appendConjuctionToWhereclause(StringBuilder whereClause,
             String expression) {
         if(whereClause.length() != 0 && expression.length() != 0) {
             whereClause.append(" AND ");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/jpa/JPAWeblogManagerImpl.java Sun Dec  1 04:58:07 2013
@@ -460,8 +460,8 @@ public class JPAWeblogManagerImpl implem
                       
         List params = new ArrayList();
         int size = 0;
-        StringBuffer queryString = new StringBuffer();
-        StringBuffer whereClause = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
+        StringBuilder whereClause = new StringBuilder();
         
         queryString.append("SELECT w FROM Weblog w WHERE ");
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/comment/AutoformatPlugin.java Sun Dec  1 04:58:07 2013
@@ -67,7 +67,7 @@ public class AutoformatPlugin implements
          *
          * NOTE: we consider a paragraph to be 2 endlines with no text between them
          */
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         try {
             BufferedReader br = new BufferedReader(new StringReader(text));
             

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/ConvertLineBreaksPlugin.java Sun Dec  1 04:58:07 2013
@@ -88,7 +88,7 @@ public class ConvertLineBreaksPlugin imp
          *
          * NOTE: we consider a paragraph to be 2 endlines with no text between them
          */
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         try {
             BufferedReader br = new BufferedReader(new StringReader(str));
             

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/plugins/entry/SmileysPlugin.java Sun Dec  1 04:58:07 2013
@@ -123,7 +123,7 @@ public class SmileysPlugin implements We
      */
     private String htmlEscape(String smiley) {
         char[] chars = smiley.toCharArray();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i=0; i<chars.length; i++) {
             if (chars[i] == '"') {
                 buf.append("&quot;");
@@ -151,7 +151,7 @@ public class SmileysPlugin implements We
     
     private String regexEscape(String smiley) {
         char[] chars = smiley.toCharArray();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i=0; i<chars.length; i++) {
             for (int x=0; x<escape_regex.length; x++) {
                 if (escape_regex[x] == chars[i]) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java Sun Dec  1 04:58:07 2013
@@ -151,7 +151,7 @@ public class SharedThemeFromDir extends 
     }
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(name);
         sb.append("\n");
 

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/business/PlanetURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/business/PlanetURLStrategy.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/business/PlanetURLStrategy.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/planet/business/PlanetURLStrategy.java Sun Dec  1 04:58:07 2013
@@ -36,7 +36,7 @@ public class PlanetURLStrategy extends M
      */
     public String getPlanetURL(String planet) {
         
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         
         PlanetManager mgr = WebloggerFactory.getWeblogger().getPlanetManager();
         
@@ -54,7 +54,7 @@ public class PlanetURLStrategy extends M
      */
     public String getPlanetGroupURL(String planet, String group, int pageNum) {
 
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         String sep = "?";
         
         url.append(getPlanetURL(planet));
@@ -83,7 +83,7 @@ public class PlanetURLStrategy extends M
      */
     public String getPlanetGroupFeedURL(String planet, String group, String format) {
         
-        StringBuffer url = new StringBuffer();
+        StringBuilder url = new StringBuilder();
         String sep = "?";
         
         url.append(WebloggerRuntimeConfig.getAbsoluteContextURL());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/MediaFile.java Sun Dec  1 04:58:07 2013
@@ -288,7 +288,7 @@ public class MediaFile implements Serial
     }
 
     public String getTagsAsString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (Iterator it = getTags().iterator(); it.hasNext();) {
             sb.append(((MediaFileTag) it.next()).getName()).append(" ");
         }

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TagStat.java Sun Dec  1 04:58:07 2013
@@ -54,7 +54,7 @@ public class TagStat implements java.io.
     }
 
     public String toString() {
-        StringBuffer str = new StringBuffer("{");
+        StringBuilder str = new StringBuilder("{");
 
         str.append("name=" + name + " " + "count=" + count);
         str.append('}');

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/TaskLock.java Sun Dec  1 04:58:07 2013
@@ -85,7 +85,7 @@ public class TaskLock implements Seriali
 
     @Override
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getName());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogCategory.java Sun Dec  1 04:58:07 2013
@@ -86,7 +86,7 @@ public class WeblogCategory implements S
     //------------------------------------------------------- Good citizenship
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("{");
         buf.append(getId());
         buf.append(", ").append(getPath());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogEntry.java Sun Dec  1 04:58:07 2013
@@ -630,7 +630,7 @@ public class WeblogEntry implements Seri
     }
    
     public String getTagsAsString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         // Sort by name
         Set<WeblogEntryTag> tmp = new TreeSet<WeblogEntryTag>(new WeblogEntryTagComparator());
         tmp.addAll(getTags());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/pojos/WeblogReferrer.java Sun Dec  1 04:58:07 2013
@@ -230,7 +230,7 @@ public class WeblogReferrer implements S
     }
     
     public String getDisplayUrl(int maxWidth, boolean includeHits) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         
         String url = StringEscapeUtils.escapeHtml(getUrl());
         String displayUrl = url.trim();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/RollerContext.java Sun Dec  1 04:58:07 2013
@@ -144,7 +144,7 @@ public class RollerContext extends Conte
         // if preparation failed or is incomplete then we are done,
         // otherwise try to bootstrap the business tier
         if (!WebloggerStartup.isPrepared()) {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append("\n--------------------------------------------------------------");
             buf.append("\nRoller Weblogger startup INCOMPLETE, user interaction required");
             buf.append("\n--------------------------------------------------------------");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java Sun Dec  1 04:58:07 2013
@@ -97,7 +97,7 @@ public class CustomOpenIDAuthenticationP
                 URL url = new URL(returnToUrl);
                 int port = url.getPort();
 
-                StringBuffer realmBuffer = new StringBuffer(returnToUrl.length())
+                StringBuilder realmBuffer = new StringBuilder(returnToUrl.length())
                         .append(url.getProtocol())
                         .append("://")
                         .append(url.getHost());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/core/tags/calendar/BigWeblogCalendarModel.java Sun Dec  1 04:58:07 2013
@@ -73,7 +73,7 @@ public class BigWeblogCalendarModel exte
     public String getContent(Date day) {
         String content = null;
         try {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             
             // get the 8 char YYYYMMDD datestring for day, returns null
             // if no weblog entry on that day

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/AkismetCommentValidator.java Sun Dec  1 04:58:07 2013
@@ -53,7 +53,7 @@ public class AkismetCommentValidator imp
     }
 
     public int validate(WeblogEntryComment comment, RollerMessages messages) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("blog=").append(
             WebloggerFactory.getWeblogger().getUrlStrategy().getWeblogURL(comment.getWeblogEntry().getWebsite(), null, true)).append("&");
         sb.append("user_ip="        ).append(comment.getRemoteHost()).append("&");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/LdapCommentAuthenticator.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/LdapCommentAuthenticator.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/LdapCommentAuthenticator.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/LdapCommentAuthenticator.java Sun Dec  1 04:58:07 2013
@@ -75,7 +75,7 @@ public class LdapCommentAuthenticator im
 			ldapPass = ldapPassTemp != null ? ldapPassTemp : "";
 		}
 
-		StringBuffer sb = new StringBuffer();
+		StringBuilder sb = new StringBuilder();
 
 		sb.append("<p>");
 		sb.append(bundle.getString("comments.ldapAuthenticatorUserName"));

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/MathCommentAuthenticator.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/MathCommentAuthenticator.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/MathCommentAuthenticator.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/plugins/comments/MathCommentAuthenticator.java Sun Dec  1 04:58:07 2013
@@ -59,7 +59,7 @@ public class MathCommentAuthenticator im
         Integer value1o = (Integer)request.getSession().getAttribute("mathValue1");
         Integer value2o = (Integer)request.getSession().getAttribute("mathValue2");
         
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         
         sb.append("<p>");
         sb.append(bundle.getString("comments.mathAuthenticatorQuestion"));

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/PlanetFeedServlet.java Sun Dec  1 04:58:07 2013
@@ -249,7 +249,7 @@ public class PlanetFeedServlet extends H
      */
     private String generateKey(PlanetRequest planetRequest) {
 
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         key.append(planetRequest.getContext());
         key.append("/");
         key.append(planetRequest.getType());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/TrackbackServlet.java Sun Dec  1 04:58:07 2013
@@ -223,7 +223,7 @@ public class TrackbackServlet extends Ht
     
     private String getSuccessResponse(String message) {
         
-        StringBuffer output = new StringBuffer();
+        StringBuilder output = new StringBuilder();
         
         output.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
         output.append("<response>");
@@ -239,7 +239,7 @@ public class TrackbackServlet extends Ht
     
     private String getErrorResponse(String message) {
         
-        StringBuffer output = new StringBuffer();
+        StringBuilder output = new StringBuilder();
         
         output.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
         output.append("<response>");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/PlanetCache.java Sun Dec  1 04:58:07 2013
@@ -191,7 +191,7 @@ public final class PlanetCache {
      */
     public String generateKey(PlanetRequest planetRequest) {
         
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         
         key.append(this.CACHE_ID).append(":");
         key.append(planetRequest.getContext());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/SiteWideCache.java Sun Dec  1 04:58:07 2013
@@ -195,7 +195,7 @@ public class SiteWideCache implements Ca
      */
     public String generateKey(WeblogPageRequest pageRequest) {
         
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         
         key.append(this.CACHE_ID).append(":");
         key.append("page/");
@@ -285,7 +285,7 @@ public class SiteWideCache implements Ca
      */
     public String generateKey(WeblogFeedRequest feedRequest) {
         
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         
         key.append(this.CACHE_ID).append(":");
         key.append("feed/");
@@ -427,7 +427,7 @@ public class SiteWideCache implements Ca
             return null;
         }
         
-        StringBuffer string = new StringBuffer();
+        StringBuilder string = new StringBuilder();
         
         String key = null;
         String[] value = null;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogFeedCache.java Sun Dec  1 04:58:07 2013
@@ -162,7 +162,7 @@ public final class WeblogFeedCache {
      */
     public String generateKey(WeblogFeedRequest feedRequest) {
         
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         
         key.append(this.CACHE_ID).append(":");
         key.append(feedRequest.getWeblogHandle());

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/rendering/util/cache/WeblogPageCache.java Sun Dec  1 04:58:07 2013
@@ -167,7 +167,7 @@ public final class WeblogPageCache {
      */
     public String generateKey(WeblogPageRequest pageRequest) {
         
-        StringBuffer key = new StringBuffer();
+        StringBuilder key = new StringBuilder();
         
         key.append(this.CACHE_ID).append(":");
         key.append(pageRequest.getWeblogHandle());
@@ -249,7 +249,7 @@ public final class WeblogPageCache {
             return null;
         }
         
-        StringBuffer string = new StringBuffer();
+        StringBuilder string = new StringBuilder();
         
         String key = null;
         String[] value = null;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBean.java Sun Dec  1 04:58:07 2013
@@ -391,7 +391,7 @@ public class EntryBean {
     
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         
         //title,locale,catId,tags,text,summary,dateString,status,comments,plugins
         buf.append("title = ").append(getTitle()).append("\n");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/StringW.java Sun Dec  1 04:58:07 2013
@@ -22,7 +22,7 @@ import org.apache.commons.lang.StringUti
 
 /**
  * A set of String library static methods. While extending String or 
- * StringBuffer would have been the nicest solution, that is not 
+ * StringBuilder would have been the nicest solution, that is not
  * possible, so a simple set of static methods seems the most workable.
  *
  * Method ideas have so far been taken from the PHP4, Ruby and .NET languages.
@@ -42,7 +42,7 @@ public final class StringW {
         // class. so must be done by hand
         char[] chrs = str.toCharArray();
         int sz = chrs.length;
-        StringBuffer buffer = new StringBuffer(2*sz);
+        StringBuilder buffer = new StringBuilder(2*sz);
         for(int i=0; i<sz; i++) {
             switch(chrs[i]) {
               case '[' :
@@ -113,7 +113,7 @@ public final class StringW {
         width++;
 
         // our best guess as to an initial size
-        StringBuffer buffer = new StringBuffer(sz/width*delim.length()+sz);
+        StringBuilder buffer = new StringBuilder(sz/width*delim.length()+sz);
 
         // every line might include a delim on the end
         //        System.err.println( "width before: "+ width );

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/tags/XmlW.java Sun Dec  1 04:58:07 2013
@@ -52,7 +52,7 @@ public final class XmlW {
      */
     public static String removeXml(String str) {
         int sz = str.length();
-        StringBuffer buffer = new StringBuffer(sz);
+        StringBuilder buffer = new StringBuilder(sz);
         boolean inString = false;
         boolean inTag = false;
         for(int i=0; i<sz; i++) {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Blacklist.java Sun Dec  1 04:58:07 2013
@@ -236,7 +236,7 @@ public class Blacklist {
      */
     private String readFromStream(InputStream txtStream, boolean saveStream) {
         String line;
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         BufferedReader in = null;
         try {
             in = new BufferedReader(
@@ -464,7 +464,7 @@ public class Blacklist {
         
     /** Return pretty list of String and RegEx rules. */
     public String toString() {
-        StringBuffer buf = new StringBuffer("blacklist ");
+        StringBuilder buf = new StringBuilder("blacklist ");
         buf.append(blacklistStr).append("\n");
         buf.append("Regex blacklist ").append(blacklistRegex);
         return buf.toString();

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/HTMLSanitizer.java Sun Dec  1 04:58:07 2013
@@ -499,7 +499,7 @@ public class HTMLSanitizer {
 	}
 
 	public static final String replaceAllNoRegex(String source, String search, String replace) {
-		StringBuffer buffer = new StringBuffer();
+		StringBuilder buffer = new StringBuilder();
 		if (source != null) {
 			if (search.length() == 0) {
 				return source;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/LinkbackExtractor.java Sun Dec  1 04:58:07 2013
@@ -122,7 +122,7 @@ public class LinkbackExtractor
         }).getParser();
 
         // Read HTML file into string
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         InputStreamReader isr = new InputStreamReader(is);
         BufferedReader br = new BufferedReader(isr);
         try

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MailUtil.java Sun Dec  1 04:58:07 2013
@@ -117,7 +117,7 @@ public class MailUtil {
             
             ResourceBundle resources = ResourceBundle.getBundle(
                     "ApplicationResources", entry.getWebsite().getLocaleInstance());
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(
                     MessageFormat.format(
                     resources.getString("weblogEntry.pendingEntrySubject"),
@@ -126,7 +126,7 @@ public class MailUtil {
                 entry.getWebsite().getHandle()
             }));
             subject = sb.toString();
-            sb = new StringBuffer();
+            sb = new StringBuilder();
             sb.append(
                     MessageFormat.format(
                     resources.getString("weblogEntry.pendingEntryContent"),
@@ -171,7 +171,7 @@ public class MailUtil {
             ResourceBundle resources = ResourceBundle.getBundle(
                     "ApplicationResources",
                     website.getLocaleInstance());
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(MessageFormat.format(
                     resources.getString("inviteMember.notificationSubject"),
                     new Object[] {
@@ -179,7 +179,7 @@ public class MailUtil {
                 website.getHandle()})
                 );
             subject = sb.toString();
-            sb = new StringBuffer();
+            sb = new StringBuilder();
             sb.append(MessageFormat.format(
                     resources.getString("inviteMember.notificationContent"),
                     new Object[] {
@@ -228,7 +228,7 @@ public class MailUtil {
             
             String rootURL = WebloggerRuntimeConfig.getAbsoluteContextURL();
             
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             
             // activationURL=
             String activationURL = rootURL
@@ -324,8 +324,8 @@ public class MailUtil {
         // Build separate owner and commenter (aka subscriber) messages
         
         // Determine with mime type to use for e-mail
-        StringBuffer msg = new StringBuffer();
-        StringBuffer ownermsg = new StringBuffer();
+        StringBuilder msg = new StringBuilder();
+        StringBuilder ownermsg = new StringBuilder();
         boolean escapeHtml = !WebloggerRuntimeConfig.getBooleanProperty("users.comments.htmlenabled");
         
         // first the commenter message
@@ -540,7 +540,7 @@ public class MailUtil {
         // form the message to be sent
         String subject = resources.getString("email.comment.commentApproved");
         
-        StringBuffer msg = new StringBuffer();
+        StringBuilder msg = new StringBuilder();
         msg.append(resources.getString("email.comment.commentApproved"));
         msg.append("\n\n");
         msg.append(WebloggerFactory.getWeblogger().getUrlStrategy()

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/MediacastResource.java Sun Dec  1 04:58:07 2013
@@ -65,7 +65,7 @@ public class MediacastResource {
     
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         
         buf.append("url = ").append(getUrl()).append("\n");
         buf.append("contentType = ").append(getContentType()).append("\n");

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/RollerMessages.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/RollerMessages.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/RollerMessages.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/RollerMessages.java Sun Dec  1 04:58:07 2013
@@ -75,7 +75,7 @@ public class RollerMessages
     }
     public String toString() 
     {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         Iterator msgs = mMessages.iterator();
         while (msgs.hasNext())
         {

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/URLUtilities.java Sun Dec  1 04:58:07 2013
@@ -44,7 +44,7 @@ public final class URLUtilities {
             return null;
         }
         
-        StringBuffer queryString = new StringBuffer();
+        StringBuilder queryString = new StringBuilder();
         
         for(Iterator keys = params.keySet().iterator(); keys.hasNext();) {
             String key = (String) keys.next();
@@ -94,7 +94,7 @@ public final class URLUtilities {
     
     
     public static String getEncodedTagsString(List tags) {
-        StringBuffer tagsString = new StringBuffer();
+        StringBuilder tagsString = new StringBuilder();
         if(tags != null && tags.size() > 0) {
             String tag = null;
             Iterator tagsIT = tags.iterator();
@@ -119,7 +119,7 @@ public final class URLUtilities {
      */
     public static String encodePath(String path) {
         int i = path.indexOf('/');
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         while (i != -1) {
             sb.append(encode(path.substring(0, i))).append('/');
             path = path.substring(i + 1);

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/Utilities.java Sun Dec  1 04:58:07 2013
@@ -161,7 +161,7 @@ public class Utilities {
         if (str == null) {
             return "";
         }
-        StringBuffer ret = new StringBuffer(str.length());
+        StringBuilder ret = new StringBuilder(str.length());
         int start = 0;
         int beginTag = str.indexOf('<');
         int endTag = 0;
@@ -229,7 +229,7 @@ public class Utilities {
             return html;
         }
         Matcher m = mLinkPattern.matcher(html);
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         while (m.find()) {
             int start = m.start();
             int end = m.end();
@@ -263,7 +263,7 @@ public class Utilities {
      * supplied char.
      */
     public static String replaceNonAlphanumeric(String str, char subst) {
-        StringBuffer ret = new StringBuffer(str.length());
+        StringBuilder ret = new StringBuilder(str.length());
         char[] testChars = str.toCharArray();
         for (int i = 0; i < testChars.length; i++) {
             if (Character.isLetterOrDigit(testChars[i])) {
@@ -280,7 +280,7 @@ public class Utilities {
      * Remove occurences of non-alphanumeric characters.
      */
     public static String removeNonAlphanumeric(String str) {
-        StringBuffer ret = new StringBuffer(str.length());
+        StringBuilder ret = new StringBuilder(str.length());
         char[] testChars = str.toCharArray();
         for (int i = 0; i < testChars.length; i++) {
             // MR: Allow periods in page links
@@ -415,7 +415,7 @@ public class Utilities {
      * Reads an inputstream into a string
      */
     public static String streamToString(InputStream is) throws IOException {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         BufferedReader in = new BufferedReader(new InputStreamReader(is));
         String line;
         while ((line = in.readLine()) != null) {
@@ -542,7 +542,7 @@ public class Utilities {
         // now calculate the hash
         byte[] encodedPassword = md.digest();
         
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         
         for (int i = 0; i < encodedPassword.length; i++) {
             if ((encodedPassword[i] & 0xff) < 0x10) {
@@ -758,8 +758,8 @@ public class Utilities {
      */
     private static String removeVisibleHTMLTags(String str) {
         str = stripLineBreaks(str);
-        StringBuffer result = new StringBuffer(str);
-        StringBuffer lcresult = new StringBuffer(str.toLowerCase());
+        StringBuilder result = new StringBuilder(str);
+        StringBuilder lcresult = new StringBuilder(str.toLowerCase());
         
         // <img should take care of smileys
         String[] visibleTags = {"<img"}; // are there others to add?
@@ -822,7 +822,7 @@ public class Utilities {
         if (str == null) {
             return "";
         }
-        StringBuffer ret = new StringBuffer(str.length());
+        StringBuilder ret = new StringBuilder(str.length());
         int start = 0;
         int beginTag = str.indexOf('<');
         int endTag = 0;
@@ -925,7 +925,7 @@ public class Utilities {
         int byte2;
         int byte3;
         int iByteLen = aValue.length;
-        StringBuffer tt = new StringBuffer();
+        StringBuilder tt = new StringBuilder();
         
         for (int i = 0; i < iByteLen; i += 3) {
             boolean bByte2 = (i + 1) < iByteLen;
@@ -952,7 +952,7 @@ public class Utilities {
             throw new NullPointerException();
         }
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char[] charArray = tag.toCharArray();
         for (int i = 0; i < charArray.length; i++) {
             char c = charArray[i];

Modified: roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/BookmarkTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/BookmarkTest.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/BookmarkTest.java (original)
+++ roller/trunk/app/src/test/java/org/apache/roller/weblogger/business/BookmarkTest.java Sun Dec  1 04:58:07 2013
@@ -348,7 +348,7 @@ public class BookmarkTest extends TestCa
     private String fileToString( InputStream is ) throws java.io.IOException {
         BufferedReader br = new BufferedReader(new InputStreamReader(is));
         String s = null;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         while ( (s=br.readLine()) != null ) {
             sb.append( s );
         }

Modified: roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/rendering/util/CommentValidatorTest.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/rendering/util/CommentValidatorTest.java?rev=1546778&r1=1546777&r2=1546778&view=diff
==============================================================================
--- roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/rendering/util/CommentValidatorTest.java (original)
+++ roller/trunk/app/src/test/java/org/apache/roller/weblogger/ui/rendering/util/CommentValidatorTest.java Sun Dec  1 04:58:07 2013
@@ -70,7 +70,7 @@ public class CommentValidatorTest extend
         WeblogEntryComment comment = createEmptyComment();
 
         // string that exceeds default excess size threshold of 1000
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i=0; i<101; i++) {
             sb.append("0123456789");
         }



Mime
View raw message