fix(性能测试): 修复文件可能为空的问题

This commit is contained in:
Captain.B 2021-07-13 12:19:55 +08:00 committed by 刘瑞斌
parent 3317cde266
commit a19e6a39aa
1 changed files with 3 additions and 0 deletions

View File

@ -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;