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());