From cff497fae5523e5223fac77364591ab555e1a5f4 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 31 May 2023 10:32:31 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8E=BB=E6=8E=89=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/metadata/service/FileMetadataService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java index 77d1b6cac8..f948e9f021 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/metadata/service/FileMetadataService.java @@ -1,6 +1,6 @@ package io.metersphere.metadata.service; -import com.alibaba.nacos.common.utils.ByteUtils; + import io.metersphere.base.domain.*; import io.metersphere.base.mapper.FileAssociationMapper; import io.metersphere.base.mapper.FileContentMapper; @@ -265,7 +265,7 @@ public class FileMetadataService { if (StringUtils.isEmpty(fileMetadata.getStorage()) && StringUtils.isEmpty(fileMetadata.getResourceType())) { bytes = getContent(fileMetadata.getId()); } - if (ByteUtils.isEmpty(bytes)) { + if (bytes == null || bytes.length == 0) { FileRequest request = new FileRequest(fileMetadata.getProjectId(), fileMetadata.getName(), fileMetadata.getType()); request.setResourceType(fileMetadata.getResourceType()); request.setPath(fileMetadata.getPath());