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 09:32:04 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 0dce105  JMESPathExtractor writes error log entries if JMESPath filter returns empty
result
0dce105 is described below

commit 0dce105f13c7d95ef84225984c5c2c1a967243a8
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sat Apr 24 11:31:25 2021 +0200

    JMESPathExtractor writes error log entries if JMESPath filter returns empty result
    
    Bugzilla Id: 65257
---
 .../org/apache/jmeter/extractor/json/jmespath/JMESPathExtractor.java    | 2 +-
 xdocs/changes.xml                                                       | 1 +
 2 files 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 2c64657..dc130c1 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
@@ -74,7 +74,7 @@ public class JMESPathExtractor extends AbstractScopedTestElement
         try {
             JsonNode actualObj = OBJECT_MAPPER.readValue(jsonResponse, JsonNode.class);
             JsonNode result = JMESPathCache.getInstance().get(jsonPathExpression).search(actualObj);
-            if (result.isNull()) {
+            if (result.isNull() || result.isEmpty()) {
                 handleNullResult(vars, refName, defaultValue, matchNumber);
                 return;
             }
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index b7d7fca..571b571 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -159,6 +159,7 @@ Summary
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>
 <ul>
+  <li><bug>65257</bug>JMESPathExtractor writes error log entries if JMESPath
filter returns empty result</li>
 </ul>
 
 <h3>Functions</h3>

Mime
View raw message