File tree 2 files changed +8
-12
lines changed
APIJSONORM/src/main/java/apijson
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -505,16 +505,12 @@ public static String formatColon(@NotNull String key) {
505
505
public static String formatHyphen (@ NotNull String key , boolean firstCase ) {
506
506
String name = "" ;
507
507
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 ;
517
515
}
518
-
519
-
520
516
}
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ public boolean verifyAccess(SQLConfig config) throws Exception {
277
277
if (id instanceof Number == false ) {//不能准确地判断Long,可能是Integer
278
278
throw new UnsupportedDataTypeException (table + ".id类型错误,id类型必须是Long!" );
279
279
}
280
- if (list .contains (new Long ("" + id )) == false ) {//Integer等转为Long才能正确判断。强转崩溃
280
+ if (list .contains (Long . valueOf ("" + id )) == false ) {//Integer等转为Long才能正确判断。强转崩溃
281
281
throw new IllegalAccessException (visitorIdkey + " = " + id + " 的 " + table
282
282
+ " 不允许 " + role .name () + " 用户的 " + method .name () + " 请求!" );
283
283
}
You can’t perform that action at this time.
0 commit comments