jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1381354 - /jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java
Date Wed, 05 Sep 2012 20:38:12 GMT
Author: pmouawad
Date: Wed Sep  5 20:38:12 2012
New Revision: 1381354

URL: http://svn.apache.org/viewvc?rev=1381354&view=rev
Log:
Use System.arrayCopy

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java?rev=1381354&r1=1381353&r2=1381354&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java Wed Sep  5
20:38:12 2012
@@ -148,9 +148,7 @@ public class TestOnceOnlyController exte
         int expectedNoSamples = 2 + (1 + (3 + 1) * innerLoopCount) * outerLoopCount;
         String[] expectedSamples = new String[expectedNoSamples];
         // The only once samples
-        for(int i = 0; i < onlyOnceOrder.length; i++) {
-            expectedSamples[i] = onlyOnceOrder[i];
-        }
+        System.arraycopy(onlyOnceOrder, 0, expectedSamples, 0, onlyOnceOrder.length);
         // The outer sample and the inner loop samples
         final int onceOnlySamples = onlyOnceOrder.length;
         for(int i = 0; i < order.length * outerLoopCount; i++) {
@@ -211,9 +209,8 @@ public class TestOnceOnlyController exte
         int expectedNoSamples = 2 + (1 + 2 + (1 + 1) * innerLoopCount) * outerLoopCount;
         String[] expectedSamples = new String[expectedNoSamples];
         // The only once samples
-        for(int i = 0; i < onlyOnceOrder.length; i++) {
-            expectedSamples[i] = onlyOnceOrder[i];
-        }
+        System.arraycopy(onlyOnceOrder, 0, expectedSamples, 0, onlyOnceOrder.length);
+
         // The outer sample and the inner loop samples
         final int onceOnlySamples = onlyOnceOrder.length;
         for(int i = 0; i < order.length * outerLoopCount; i++) {
@@ -300,9 +297,8 @@ public class TestOnceOnlyController exte
         int expectedNoSamples = 2 + (1 + 2 + 1 + (1 + 1 + 1) * innerLoopCount) * outerLoopCount;
         String[] expectedSamples = new String[expectedNoSamples];
         // The only once samples
-        for (int i = 0; i < onlyOnceOrder.length; i++) {
-            expectedSamples[i] = onlyOnceOrder[i];
-        }
+        System.arraycopy(onlyOnceOrder, 0, expectedSamples, 0, onlyOnceOrder.length);
+
         // The outer sample and the inner loop samples
         final int onceOnlySamples = onlyOnceOrder.length;
         for (int i = 0; i < order.length * outerLoopCount; i++) {



Mime
View raw message