jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1843120 - /jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java
Date Mon, 08 Oct 2018 09:16:30 GMT
Author: pmouawad
Date: Mon Oct  8 09:16:30 2018
New Revision: 1843120

URL: http://svn.apache.org/viewvc?rev=1843120&view=rev
Log:
Fix SONAR warnings

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java?rev=1843120&r1=1843119&r2=1843120&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/engine/TreeCloner.java Mon Oct  8 09:16:30 2018
@@ -60,8 +60,8 @@ public class TreeCloner implements HashT
      */
     @Override
     public final void addNode(Object node, HashTree subTree) {
-        node = addNodeToTree(node);
-        addLast(node);
+        Object newNode = addNodeToTree(node);
+        addLast(newNode);
     }
 
     /**
@@ -71,10 +71,10 @@ public class TreeCloner implements HashT
     protected Object addNodeToTree(Object node) {
         if ( (node instanceof TestElement) // Check can cast for clone
            // Don't clone NoThreadClone unless honourNoThreadClone == false
-          && (!honourNoThreadClone || !(node instanceof NoThreadClone))
+          && (!(honourNoThreadClone && (node instanceof NoThreadClone)))
         ) {
-            node = ((TestElement) node).clone();
-            newTree.add(objects, node);
+            Object clonedNode = ((TestElement) node).clone();
+            newTree.add(objects, clonedNode);
         } else {
             newTree.add(objects, node);
         }
@@ -100,6 +100,7 @@ public class TreeCloner implements HashT
 
     @Override
     public void processPath() {
+        // NOOP
     }
 
 }



Mime
View raw message