From 94a1bfc7cb1a859f1963373187f90e74b2b66af6 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Thu, 28 Aug 2025 15:03:07 +0800 Subject: [PATCH] fix: StringUtils.equalsIgnoreCase is deprecated --- .../captcha/core/PictureWordCaptchaServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/captcha/core/PictureWordCaptchaServiceImpl.java b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/captcha/core/PictureWordCaptchaServiceImpl.java index ed15a0277b..e5f7741907 100644 --- a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/captcha/core/PictureWordCaptchaServiceImpl.java +++ b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/framework/captcha/core/PictureWordCaptchaServiceImpl.java @@ -8,8 +8,8 @@ import com.anji.captcha.service.impl.CaptchaServiceFactory; import com.anji.captcha.util.AESUtil; import com.anji.captcha.util.ImageUtils; import com.anji.captcha.util.RandomUtils; -import org.apache.commons.lang3.StringUtils; import cn.hutool.core.util.RandomUtil; +import org.apache.commons.lang3.Strings; import java.awt.*; import java.awt.geom.AffineTransform; @@ -82,7 +82,7 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService { // 用户输入的验证码(CaptchaVO 中 没有预留字段,暂时用 pointJson 无需加解密) String userCode = captchaVO.getPointJson(); - if (!StringUtils.equalsIgnoreCase(code, userCode)) { + if (!Strings.CI.equals(code, userCode)) { afterValidateFail(captchaVO); return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_COORDINATE_ERROR); } @@ -209,4 +209,4 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService { return RandomUtil.randomString(CHARACTERS, length); } -} \ No newline at end of file +}