Commit 94a1bfc7cb1a859f1963373187f90e74b2b66af6

Authored by xingyu4j
1 parent 76f97929

fix: StringUtils.equalsIgnoreCase is deprecated

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; @@ -8,8 +8,8 @@ import com.anji.captcha.service.impl.CaptchaServiceFactory;
8 import com.anji.captcha.util.AESUtil; 8 import com.anji.captcha.util.AESUtil;
9 import com.anji.captcha.util.ImageUtils; 9 import com.anji.captcha.util.ImageUtils;
10 import com.anji.captcha.util.RandomUtils; 10 import com.anji.captcha.util.RandomUtils;
11 -import org.apache.commons.lang3.StringUtils;  
12 import cn.hutool.core.util.RandomUtil; 11 import cn.hutool.core.util.RandomUtil;
  12 +import org.apache.commons.lang3.Strings;
13 13
14 import java.awt.*; 14 import java.awt.*;
15 import java.awt.geom.AffineTransform; 15 import java.awt.geom.AffineTransform;
@@ -82,7 +82,7 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService { @@ -82,7 +82,7 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService {
82 82
83 // 用户输入的验证码(CaptchaVO 中 没有预留字段,暂时用 pointJson 无需加解密) 83 // 用户输入的验证码(CaptchaVO 中 没有预留字段,暂时用 pointJson 无需加解密)
84 String userCode = captchaVO.getPointJson(); 84 String userCode = captchaVO.getPointJson();
85 - if (!StringUtils.equalsIgnoreCase(code, userCode)) { 85 + if (!Strings.CI.equals(code, userCode)) {
86 afterValidateFail(captchaVO); 86 afterValidateFail(captchaVO);
87 return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_COORDINATE_ERROR); 87 return ResponseModel.errorMsg(RepCodeEnum.API_CAPTCHA_COORDINATE_ERROR);
88 } 88 }
@@ -209,4 +209,4 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService { @@ -209,4 +209,4 @@ public class PictureWordCaptchaServiceImpl extends AbstractCaptchaService {
209 return RandomUtil.randomString(CHARACTERS, length); 209 return RandomUtil.randomString(CHARACTERS, length);
210 } 210 }
211 211
212 -}  
213 \ No newline at end of file 212 \ No newline at end of file
  213 +}