This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new c4d3145  Only skip saving the list, if the mode is not ALL
c4d3145 is described below

commit c4d31453c29704ff42813ba99b281cb03a51bb5e
Author: Felix Schumacher <[email protected]>
AuthorDate: Thu Jun 3 18:21:22 2021 +0200

    Only skip saving the list, if the mode is not ALL
    
    Follow-up to c054d3a4d329c02e305fdfb0818f682834130d8f
    
    The tests checked for the existance of <VAR_NAME>_matchNr, even
    when no matches were found.
    
    Bugzilla Id: 65352
---
 .../src/main/java/org/apache/jmeter/extractor/BoundaryExtractor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/components/src/main/java/org/apache/jmeter/extractor/BoundaryExtractor.java
 
b/src/components/src/main/java/org/apache/jmeter/extractor/BoundaryExtractor.java
index 6b28c67..87e910b 100644
--- 
a/src/components/src/main/java/org/apache/jmeter/extractor/BoundaryExtractor.java
+++ 
b/src/components/src/main/java/org/apache/jmeter/extractor/BoundaryExtractor.java
@@ -163,7 +163,7 @@ public class BoundaryExtractor extends 
AbstractScopedTestElement implements Post
      * @return 0 if there is only one match, else the number of matches, this 
is used to remove
      */
     private int saveMatches(JMeterVariables vars, String refName, int 
matchNumber, List<String> matches) {
-        if (matches.isEmpty()) {
+        if (matchNumber >=0 && matches.isEmpty()) {
             return 0;
         }
         int matchCount = 0;

Reply via email to