commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r890452 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java
Date Mon, 14 Dec 2009 19:25:43 GMT
Author: sebb
Date: Mon Dec 14 19:25:26 2009
New Revision: 890452

URL: http://svn.apache.org/viewvc?rev=890452&view=rev
Log:
Reset StringBuilder rather than creating a new one each time.

Modified:
    commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java

Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java?rev=890452&r1=890451&r2=890452&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java Mon Dec
14 19:25:26 2009
@@ -78,7 +78,7 @@
  */
 final class Debugger implements ParserVisitor {
     /** The builder to compose messages. */
-    private StringBuilder builder;
+    private final StringBuilder builder;
     /** The cause of the issue to debug. */
     private JexlNode cause;
     /** The starting character location offset of the cause in the builder. */
@@ -105,7 +105,7 @@
         start = 0;
         end = 0;
         if (node != null) {
-            builder = new StringBuilder();
+            builder.setLength(0);
             this.cause = node;
             // make arg cause become the root cause
             JexlNode root = node;



Mime
View raw message