mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-11-04 09:01:40 +08:00 
			
		
		
		
	refactor: 根据 Sonar 建议调整,StrUtil => CharSequenceUtil
工具层调整以减少 Sonar 建议,应用层则可忽略,怎么用方便怎么来
This commit is contained in:
		@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user