jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] 02/03: Revert to correct logic for detecting lists
Date Sat, 28 Sep 2019 10:42:19 GMT
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

commit 59b599717b2862515bd792564e4d4bc9d3b764f2
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sat Sep 28 12:31:46 2019 +0200

    Revert to correct logic for detecting lists
    
    The important bit here was more than one element, not that the list is
    not empty.
---
 .../org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/src/main/java/org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java
b/src/components/src/main/java/org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java
index 7274bcc..cd6325b 100644
--- a/src/components/src/main/java/org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java
+++ b/src/components/src/main/java/org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java
@@ -82,7 +82,7 @@ public class JMESPathExtractor extends AbstractScopedTestElement
             }
             List<String> resultList = splitJson(result);
             // if more than one value extracted, suffix with "_index"
-            if (!resultList.isEmpty()) {
+            if (resultList.size() > 1) {
                 handleListResult(vars, refName, defaultValue, matchNumber, resultList);
             } else {
                 // else just one value extracted


Mime
View raw message