From a00482d5d7ad4a29532779a696fc5ceffa99c138 Mon Sep 17 00:00:00 2001 From: runphp Date: Fri, 11 Feb 2022 07:46:11 +0000 Subject: [PATCH] Condition 'DEFAULT_MAX_SIZE != -1' is always 'true' --- .../src/main/java/com/ruoyi/file/utils/FileUploadUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java index 02eb1cd29..5e8709109 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java @@ -123,7 +123,7 @@ public class FileUploadUtils throws FileSizeLimitExceededException, InvalidExtensionException { long size = file.getSize(); - if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) + if (size > DEFAULT_MAX_SIZE) { throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); }