jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1380534 - /jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
Date Tue, 04 Sep 2012 10:45:35 GMT
Author: pmouawad
Date: Tue Sep  4 10:45:35 2012
New Revision: 1380534

URL: http://svn.apache.org/viewvc?rev=1380534&view=rev
Log:
Reuse StringBuilder

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java?rev=1380534&r1=1380533&r2=1380534&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java Tue
Sep  4 10:45:35 2012
@@ -200,8 +200,9 @@ public class ModuleControllerGui extends
         }
         String seperator = " > "; // $NON-NLS-1$
         if (node != null) {
+            StringBuilder name = new StringBuilder();
             for (int i = 0; i < node.getChildCount(); i++) {
-                StringBuilder name = new StringBuilder();
+                name.setLength(0);
                 JMeterTreeNode cur = (JMeterTreeNode) node.getChildAt(i);
                 TestElement te = cur.getTestElement();
                 if (te instanceof AbstractThreadGroup) {
@@ -215,7 +216,7 @@ public class ModuleControllerGui extends
                     name.append(cur.getName());
                     TreeNodeWrapper tnw = new TreeNodeWrapper(cur, name.toString());
                     nodesModel.addElement(tnw);
-                    name = new StringBuilder();
+                    name.setLength(0);
                     name.append(cur.getName());
                     name.append(seperator);
                     buildNodesModel(cur, name.toString(), level + 1);



Mime
View raw message