vlsi commented on code in PR #6453:
URL: https://github.com/apache/jmeter/pull/6453#discussion_r2083586429


##########
src/core/src/main/java/org/apache/jmeter/threads/TestCompiler.java:
##########
@@ -203,7 +203,8 @@ private void saveSamplerConfigs(Sampler sam) {
         List<Assertion> assertions = new ArrayList<>();
         List<PostProcessor> posts = new ArrayList<>();
         List<PreProcessor> pres = new ArrayList<>();
-        for (int i = stack.size(); i > 0; i--) {
+        int stackSize = stack.size();
+        for (int i = stackSize; i > 0; i--) {

Review Comment:
   This change is not justified. `int i = stack.size();` was executed only once 
when the loop was initialized, so adding extra variable changes nothing here.



##########
src/core/src/main/java/org/apache/jmeter/threads/TestCompiler.java:
##########
@@ -248,7 +249,8 @@ private void 
saveTransactionControllerConfigs(TransactionController tc) {
         List<Assertion> assertions = new ArrayList<>();
         List<PostProcessor> posts = new ArrayList<>();
         List<PreProcessor> pres = new ArrayList<>();
-        for (int i = stack.size(); i > 0; i--) {
+        int stackSize = stack.size();
+        for (int i = stackSize; i > 0; i--) {

Review Comment:
   Same here: please revert it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to