Am 28.09.19 um 13:12 schrieb Philippe Mouawad:
> On Saturday, September 28, 2019, <fschumac...@apache.org> wrote:
>
>> 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.schumac...@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) {
>
> I don’t think intention was the same here

This is a revert from a change, that I did in one of the commits before.
We want to differentiate here between lists that have more than one
elements and single results.

Felix

>
>>                  handleListResult(vars, refName, defaultValue,
>> matchNumber, resultList);
>>              } else {
>>                  // else just one value extracted
>>
>>

Reply via email to