Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions APIJSONORM/src/main/java/apijson/JSONResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,12 @@ public static String formatColon(@NotNull String key) {
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;
}


}
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/orm/AbstractVerifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public boolean verifyAccess(SQLConfig config) throws Exception {
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() + " 请求!");
}
Expand Down