jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1244707 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/action/ChangeParent.java xdocs/changes.xml
Date Wed, 15 Feb 2012 20:50:30 GMT
Author: pmouawad
Date: Wed Feb 15 20:50:29 2012
New Revision: 1244707

URL: http://svn.apache.org/viewvc?rev=1244707&view=rev
Log:
Bug 52672 - Change Controller action deletes all but one child samplers

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/ChangeParent.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ChangeParent.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ChangeParent.java?rev=1244707&r1=1244706&r2=1244707&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ChangeParent.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ChangeParent.java Wed Feb 15 20:50:29
2012
@@ -21,7 +21,6 @@ package org.apache.jmeter.gui.action;
 import java.awt.Component;
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
-import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -78,13 +77,12 @@ public class ChangeParent implements Com
         int index = parentNode.getIndex(currentNode);
         treeModel.insertNodeInto(newNode, parentNode, index);
         treeModel.removeNodeFromParent(currentNode);
-        Enumeration<JMeterTreeNode> nodes = currentNode.children();
-        while(nodes.hasMoreElements()) {
-            JMeterTreeNode node = nodes.nextElement();
+        int childCount = currentNode.getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            JMeterTreeNode node = (JMeterTreeNode) currentNode.getChildAt(0);
             treeModel.removeNodeFromParent(node);
             treeModel.insertNodeInto(node, newNode, newNode.getChildCount());
         }
-        
     }
 
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1244707&r1=1244706&r2=1244707&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Feb 15 20:50:29 2012
@@ -100,6 +100,7 @@ or a Debug Sampler with all fields set t
 <h3>General</h3>
 <ul>
 <li>Bug 52639 - JSplitPane divider for log panel should be hidden if log is not activated</li>
+<li>Bug 52672 - Change Controller action deletes all but one child samplers</li>
 </ul>
 
 <!-- =================== Improvements =================== -->



Mime
View raw message