jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1818934 - /jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java
Date Thu, 21 Dec 2017 15:16:27 GMT
Author: pmouawad
Date: Thu Dec 21 15:16:27 2017
New Revision: 1818934

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

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java?rev=1818934&r1=1818933&r2=1818934&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/extractor/BoundaryExtractor.java Thu Dec
21 15:16:27 2017
@@ -114,7 +114,7 @@ public class BoundaryExtractor extends A
             prevCount = removePrevCount(vars, refName);
             List<String> matches = extractMatches(previousResult, vars, matchNumber);
             matchCount = saveMatches(vars, refName, matchNumber, matchCount, matches);
-        } catch (RuntimeException e) {
+        } catch (RuntimeException e) { // NOSONAR
             if (log.isWarnEnabled()) {
                 log.warn("{}: Error while generating result. {}", getName(), e.toString());
// NOSONAR We don't want to be too verbose
             }
@@ -158,15 +158,16 @@ public class BoundaryExtractor extends A
     }
 
     private int saveMatches(JMeterVariables vars, String refName, int matchNumber, int matchCount,
List<String> matches) {
+        int localMC = matchCount;
         if (matchNumber == 0) {
             saveRandomMatch(vars, refName, matches);
         } else if (matchNumber > 0) {
             saveOneMatch(vars, refName, matches);
         } else {
-            matchCount = matches.size();
+            localMC = matches.size();
             saveAllMatches(vars, refName, matches);
         }
-        return matchCount;
+        return localMC;
     }
 
     private void saveRandomMatch(JMeterVariables vars, String refName, List<String>
matches) {



Mime
View raw message