jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1748012 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Date Sun, 12 Jun 2016 14:14:37 GMT
Author: fschumacher
Date: Sun Jun 12 14:14:37 2016
New Revision: 1748012

URL: http://svn.apache.org/viewvc?rev=1748012&view=rev
Log:
Syntactic sugar. First check for null, then use 'new' for loop.

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1748012&r1=1748011&r2=1748012&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Sun Jun 12 14:14:37 2016
@@ -1161,9 +1161,11 @@ public class ProxyControl extends Generi
                             addTimers(treeModel, newNode, deltaTFinal);
                         }
 
-                        for (int i = 0; testElements != null && i < testElements.length;
i++) {
-                            if(canTestElementBeAddedUnderSampler(testElements[i])) {
-                                treeModel.addComponent(testElements[i], newNode);
+                        if (testElements != null) {
+                            for (TestElement testElement: testElements) {
+                                if (canTestElementBeAddedUnderSampler(testElement)) {
+                                    treeModel.addComponent(testElement, newNode);
+                                }
                             }
                         }
                     } catch (IllegalUserActionException e) {



Mime
View raw message