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 9284fb30c7..1f09d47b71 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;