fix: URL导入失败

This commit is contained in:
chenjianxing 2020-07-23 10:41:31 +08:00
parent 55a2a96da3
commit 354c6afca4
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ public class APITestService {
ApiImportParser apiImportParser = ApiImportParserFactory.getApiImportParser(request.getPlatform());
ApiImport apiImport = null;
try {
apiImport = Objects.requireNonNull(apiImportParser).parse(file.getInputStream(), request);
apiImport = Objects.requireNonNull(apiImportParser).parse(file == null ? null : file.getInputStream(), request);
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
MSException.throwException(Translator.get("parse_data_error"));