mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-14 03:03:07 +08:00
refactor: 使用 CharSequenceUtil 替换部分 StrUtil 使用以解决 Sonar 问题
This commit is contained in:
@@ -19,8 +19,8 @@ package top.continew.starter.storage.strategy;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.io.file.FileNameUtil;
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.exception.BusinessException;
|
||||
@@ -123,7 +123,7 @@ public class LocalStorageStrategy implements StorageStrategy<LocalClient> {
|
||||
// 格式化文件名 防止上传后重复
|
||||
String formatFileName = StorageUtils.formatFileName(fileName);
|
||||
// 判断文件路径是否为空 为空给默认路径 格式 2024/12/30/
|
||||
if (StrUtil.isEmpty(path)) {
|
||||
if (CharSequenceUtil.isEmpty(path)) {
|
||||
path = StorageUtils.localDefaultPath();
|
||||
}
|
||||
// 判断文件夹是否存在 不存在则创建
|
||||
|
Reference in New Issue
Block a user