You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/12/14 20:25:43 UTC
svn commit: r890452 -
/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/Debugger.java
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;