验证码生成优化,删除不会到达的else判断

pull/386/head
何建 2024-12-11 16:37:59 +08:00
parent 7216b56a56
commit 3e352b338c
1 changed files with 1 additions and 8 deletions

View File

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