File tree Expand file tree Collapse file tree
APIJSONORM/src/main/java/apijson Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -505,16 +505,12 @@ public static String formatColon(@NotNull String key) {
505505 public static String formatHyphen (@ NotNull String key , boolean firstCase ) {
506506 String name = "" ;
507507
508- StringTokenizer parts = new StringTokenizer (key , "-" );
509- name += parts .nextToken ();
510- while (parts .hasMoreTokens ())
511- {
512- String part = parts .nextToken ();
513- name += firstCase ? StringUtil .firstCase (part , true ) : part ;
514- }
515-
516- return name ;
508+ StringTokenizer parts = new StringTokenizer (key , "-" );
509+ name += parts .nextToken ();
510+ while (parts .hasMoreTokens ()) {
511+ String part = parts .nextToken ();
512+ name += firstCase ? StringUtil .firstCase (part , true ) : part ;
513+ }
514+ return name ;
517515 }
518-
519-
520516}
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ public boolean verifyAccess(SQLConfig config) throws Exception {
277277 if (id instanceof Number == false ) {//不能准确地判断Long,可能是Integer
278278 throw new UnsupportedDataTypeException (table + ".id类型错误,id类型必须是Long!" );
279279 }
280- if (list .contains (new Long ("" + id )) == false ) {//Integer等转为Long才能正确判断。强转崩溃
280+ if (list .contains (Long . valueOf ("" + id )) == false ) {//Integer等转为Long才能正确判断。强转崩溃
281281 throw new IllegalAccessException (visitorIdkey + " = " + id + " 的 " + table
282282 + " 不允许 " + role .name () + " 用户的 " + method .name () + " 请求!" );
283283 }
You can’t perform that action at this time.
0 commit comments