jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject [jmeter] branch master updated: JMESPathExtractor writes error log entries if JMESPath filter returns empty result
Date Sat, 24 Apr 2021 10:43:24 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


The following commit(s) were added to refs/heads/master by this push:
     new 5921a91  JMESPathExtractor writes error log entries if JMESPath filter returns empty
result
5921a91 is described below

commit 5921a91d95957f328a46f01adc780a507860f05a
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sat Apr 24 12:42:43 2021 +0200

    JMESPathExtractor writes error log entries if JMESPath filter returns empty result
    
    Third try to fix the bug and make the linter happy.
    
    Bugzilla Id: 65257
---
 .../org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java   | 3 ++-
 1 file changed, 2 insertions(+), 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 a1e5eea..78e72da 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
@@ -88,7 +88,8 @@ public class JMESPathExtractor extends AbstractScopedTestElement
             if (resultList.size() > 1) {
                 handleListResult(vars, refName, defaultValue, matchNumber, resultList);
             } else if (resultList.isEmpty()){
-                // no value extracted. Use defaultValue
+                handleNullResult(vars, refName, defaultValue, matchNumber);
+                return;
             } else {
                 // else just one value extracted
                 handleSingleResult(vars, refName, matchNumber, resultList);

Mime
View raw message