mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -13,9 +13,9 @@ public abstract class AbstractGenerator implements CodeGenerator {
|
||||
private static final long serialVersionUID = 8685744597154953479L;
|
||||
|
||||
/** 基础字符集合,用于随机获取字符串的字符集合 */
|
||||
protected String baseStr;
|
||||
protected final String baseStr;
|
||||
/** 验证码长度 */
|
||||
protected int length;
|
||||
protected final int length;
|
||||
|
||||
/**
|
||||
* 构造,使用字母+数字做为基础
|
||||
|
@@ -42,12 +42,11 @@ public class MathGenerator implements CodeGenerator {
|
||||
number1 = StrUtil.padAfter(number1, this.numberLength, CharUtil.SPACE);
|
||||
number2 = StrUtil.padAfter(number2, this.numberLength, CharUtil.SPACE);
|
||||
|
||||
final String code = StrUtil.builder()//
|
||||
return StrUtil.builder()//
|
||||
.append(number1)//
|
||||
.append(RandomUtil.randomChar(operators))//
|
||||
.append(number2)//
|
||||
.append('=').toString();
|
||||
return code;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user