From 354c6afca4c1af8170290798805d5037f4d60919 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 23 Jul 2020 10:41:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20URL=E5=AF=BC=E5=85=A5=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/api/service/APITestService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java index c47e54e813..44a25e32d9 100644 --- a/backend/src/main/java/io/metersphere/api/service/APITestService.java +++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java @@ -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"));