Merge pull request #225 from gdjs2/master
Format the code & Replace the Long(String) by Long.valueOf(String)
This commit is contained in:
commit
c40b48c78b
@ -505,16 +505,12 @@ public class JSONResponse extends apijson.JSONObject {
|
||||
public static String formatHyphen(@NotNull String key, boolean firstCase) {
|
||||
String name = "";
|
||||
|
||||
StringTokenizer parts = new StringTokenizer(key, "-");
|
||||
name += parts.nextToken();
|
||||
while(parts.hasMoreTokens())
|
||||
{
|
||||
String part = parts.nextToken();
|
||||
name += firstCase ? StringUtil.firstCase(part, true) : part;
|
||||
}
|
||||
|
||||
return name;
|
||||
StringTokenizer parts = new StringTokenizer(key, "-");
|
||||
name += parts.nextToken();
|
||||
while(parts.hasMoreTokens()) {
|
||||
String part = parts.nextToken();
|
||||
name += firstCase ? StringUtil.firstCase(part, true) : part;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ public abstract class AbstractVerifier<T> implements Verifier<T>, IdCallback {
|
||||
if (id instanceof Number == false) {//不能准确地判断Long,可能是Integer
|
||||
throw new UnsupportedDataTypeException(table + ".id类型错误,id类型必须是Long!");
|
||||
}
|
||||
if (list.contains(new Long("" + id)) == false) {//Integer等转为Long才能正确判断。强转崩溃
|
||||
if (list.contains(Long.valueOf("" + id)) == false) {//Integer等转为Long才能正确判断。强转崩溃
|
||||
throw new IllegalAccessException(visitorIdkey + " = " + id + " 的 " + table
|
||||
+ " 不允许 " + role.name() + " 用户的 " + method.name() + " 请求!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user