Author: fschumacher
Date: Mon Feb 12 16:34:21 2018
New Revision: 1824012

URL: http://svn.apache.org/viewvc?rev=1824012&view=rev
Log:
Name part of the logic by assigning it to a variable

Part of #356 on Github. Contributed by Graham Russell (graham at ham1.co.uk)

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=1824012&r1=1824011&r2=1824012&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
 Mon Feb 12 16:34:21 2018
@@ -403,10 +403,11 @@ public class ModuleControllerGui extends
                     DefaultMutableTreeNode newNode = new 
DefaultMutableTreeNode(cur);
                     parent.add(newNode);
                     buildTreeNodeModel(cur, level + 1, newNode);
+                    final boolean isController = te instanceof Controller
+                            && !(te instanceof ModuleController
+                                    || te instanceof AbstractThreadGroup);
                     hasAtLeastOneController = 
-                            hasAtLeastOneController || (
-                                    te instanceof Controller && 
-                                    !(te instanceof ModuleController || te 
instanceof AbstractThreadGroup));
+                            hasAtLeastOneController || isController;
                 } else if (te instanceof TestPlan) {
                     ((DefaultMutableTreeNode) moduleToRunTreeModel.getRoot())
                             .setUserObject(cur);


Reply via email to