refactor: 根据 Sonar 建议调整,StrUtil => CharSequenceUtil

工具层调整以减少 Sonar 建议,应用层则可忽略,怎么用方便怎么来
This commit is contained in:
2024-02-07 17:48:32 +08:00
parent 00bba33517
commit ea71cf573b
26 changed files with 117 additions and 114 deletions

View File

@@ -17,7 +17,7 @@
package top.charles7c.continew.starter.captcha.graphic.core;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.text.CharSequenceUtil;
import com.wf.captcha.base.Captcha;
import top.charles7c.continew.starter.captcha.graphic.autoconfigure.GraphicCaptchaProperties;
@@ -46,7 +46,7 @@ public class GraphicCaptchaService {
Captcha captcha = ReflectUtil.newInstance(properties.getType().getCaptchaImpl(), properties
.getWidth(), properties.getHeight());
captcha.setLen(properties.getLength());
if (StrUtil.isNotBlank(properties.getFontName())) {
if (CharSequenceUtil.isNotBlank(properties.getFontName())) {
captcha.setFont(new Font(properties.getFontName(), Font.PLAIN, properties.getFontSize()));
}
return captcha;