velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r687370 - /velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
Date Wed, 20 Aug 2008 15:14:05 GMT
Author: nbubna
Date: Wed Aug 20 08:14:05 2008
New Revision: 687370

URL: http://svn.apache.org/viewvc?rev=687370&view=rev
Log:
no need for multiple StrBuilders

Modified:
    velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java

Modified: velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java?rev=687370&r1=687369&r2=687370&view=diff
==============================================================================
--- velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
(original)
+++ velocity/engine/trunk/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
Wed Aug 20 08:14:05 2008
@@ -52,7 +52,7 @@
             return "";
         }
 
-        StrBuilder specialText = new StrBuilder();
+        StrBuilder sb = new StrBuilder();
 
         Token tmp_t = t.specialToken;
 
@@ -65,8 +65,6 @@
         {
             String st = tmp_t.image;
 
-            StrBuilder sb = new StrBuilder();
-
             for(int i = 0, is = st.length(); i < is; i++)
             {
                 char c = st.charAt(i);
@@ -125,12 +123,10 @@
                 }
             }
 
-            specialText.append(sb);
-
             tmp_t = tmp_t.next;
         }
 
-        return specialText.toString();
+        return sb.toString();
     }
 
     /**



Mime
View raw message