去除生成验证码多余的逻辑判断

This commit is contained in:
稚屿 2022-07-13 01:00:44 +00:00 committed by Gitee
parent c7c3da2038
commit edefee46b2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -45,7 +45,7 @@ public class KaptchaTextCreator extends DefaultTextCreator
suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
} }
} }
else if (randomoperands == 2) else
{ {
if (x >= y) if (x >= y)
{ {
@ -62,13 +62,6 @@ public class KaptchaTextCreator extends DefaultTextCreator
suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
} }
} }
else
{
result = x + y;
suChinese.append(CNUMBERS[x]);
suChinese.append("+");
suChinese.append(CNUMBERS[y]);
}
suChinese.append("=?@" + result); suChinese.append("=?@" + result);
return suChinese.toString(); return suChinese.toString();
} }