From baeae67cfa5d01ce6124a77a34c7d57d7153b5f7 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 31 Mar 2020 16:02:42 +0800 Subject: [PATCH] bug fix --- .../parse/xml/reader/jmx/JmeterDocumentParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java index 5e60149117..5d6d418385 100644 --- a/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -137,7 +137,7 @@ public class JmeterDocumentParser implements DocumentParser { } private void processCheckoutResponseAssertion(Element element) { - if (context.getProperty("statusCode") == null || JSON.parseArray("statusCode").size() == 0) { + if (context.getProperty("statusCode") == null || JSON.parseArray(context.getProperty("statusCode").toString()).size() == 0) { return; } Document document = element.getOwnerDocument(); @@ -187,7 +187,7 @@ public class JmeterDocumentParser implements DocumentParser { } private void processCheckoutArguments(Element ele) { - if (context.getProperty("params") == null || JSON.parseArray("params").size() == 0) { + if (context.getProperty("params") == null || JSON.parseArray(context.getProperty("params").toString()).size() == 0) { return; } Node hashTree = ele.getNextSibling(); @@ -230,7 +230,7 @@ public class JmeterDocumentParser implements DocumentParser { } private void processCheckoutDnsCacheManager(Element ele) { - if (context.getProperty("domains") == null || JSON.parseArray("domains").size() == 0) { + if (context.getProperty("domains") == null || JSON.parseArray(context.getProperty("domains").toString()).size() == 0) { return; } Node hashTree = ele.getNextSibling();