From a19e6a39aab3306d73a4b0efdd5165e09a29042c Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 13 Jul 2021 12:19:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E5=8F=AF=E8=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/parse/xml/reader/jmx/JmeterDocumentParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java index b479aeb5c9..70fde6a9af 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -286,6 +286,9 @@ public class JmeterDocumentParser implements DocumentParser { int resourceIndex = context.getResourceIndex(); String filename = item.getTextContent(); byte[] content = context.getTestResourceFiles().get(filename); + if (content == null) { + return; + } StringTokenizer tokenizer = new StringTokenizer(new String(content), "\n"); if (!tokenizer.hasMoreTokens()) { return;