fix(性能测试): 修复文件可能为空的问题
This commit is contained in:
parent
3317cde266
commit
a19e6a39aa
|
@ -286,6 +286,9 @@ public class JmeterDocumentParser implements DocumentParser {
|
||||||
int resourceIndex = context.getResourceIndex();
|
int resourceIndex = context.getResourceIndex();
|
||||||
String filename = item.getTextContent();
|
String filename = item.getTextContent();
|
||||||
byte[] content = context.getTestResourceFiles().get(filename);
|
byte[] content = context.getTestResourceFiles().get(filename);
|
||||||
|
if (content == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
StringTokenizer tokenizer = new StringTokenizer(new String(content), "\n");
|
StringTokenizer tokenizer = new StringTokenizer(new String(content), "\n");
|
||||||
if (!tokenizer.hasMoreTokens()) {
|
if (!tokenizer.hasMoreTokens()) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue