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: If no JSON Response can be found assume an empty string
Date Sat, 28 Sep 2019 12:21:50 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 c1385fb  If no JSON Response can be found assume an empty string
c1385fb is described below

commit c1385fba46f8d3f01b414de2656c5043efbd7c11
Author: Felix Schumacher <felix.schumacher@internetallee.de>
AuthorDate: Sat Sep 28 14:21:34 2019 +0200

    If no JSON Response can be found assume an empty string
---
 .../org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/components/src/main/java/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
b/src/components/src/main/java/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
index 17e478c..74718ce 100644
--- a/src/components/src/main/java/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
+++ b/src/components/src/main/java/org/apache/jmeter/extractor/json/jsonpath/JSONPostProcessor.java
@@ -64,9 +64,6 @@ public class JSONPostProcessor
         JMeterContext context = getThreadContext();
         JMeterVariables vars = context.getVariables();
         String jsonResponse = extractJsonResponse(context, vars);
-        if (jsonResponse == null) {
-            return;
-        }
         String[] refNames = getRefNames().split(SEPARATOR);
         String[] jsonPathExpressions = getJsonPathExpressions().split(SEPARATOR);
         String[] defaultValues = getDefaultValues().split(SEPARATOR);
@@ -203,7 +200,7 @@ public class JSONPostProcessor
     }
 
     private String extractJsonResponse(JMeterContext context, JMeterVariables vars) {
-        String jsonResponse = null;
+        String jsonResponse = "";
         if (isScopeVariable()) {
             jsonResponse = vars.get(getVariableName());
             if (log.isDebugEnabled()) {


Mime
View raw message