From db44972ac3ae2aea514ab2734cc48f0c90469c43 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 19 Oct 2020 11:54:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C-=E7=BC=96=E8=BE=91-=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/service/FileService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/service/FileService.java b/backend/src/main/java/io/metersphere/service/FileService.java index ff2801320e..a74fb7b243 100644 --- a/backend/src/main/java/io/metersphere/service/FileService.java +++ b/backend/src/main/java/io/metersphere/service/FileService.java @@ -13,6 +13,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; @@ -132,7 +133,7 @@ public class FileService { final List testCaseFiles = testCaseFileMapper.selectByExample(testCaseFileExample); if (CollectionUtils.isEmpty(testCaseFiles)) { - return null; + return new ArrayList<>(); } List fileIds = testCaseFiles.stream().map(TestCaseFile::getFileId).collect(Collectors.toList());