diff --git a/APIJSONORM/pom.xml b/APIJSONORM/pom.xml index 975c97d66..80ec99bd8 100755 --- a/APIJSONORM/pom.xml +++ b/APIJSONORM/pom.xml @@ -22,7 +22,7 @@ com.alibaba fastjson - 1.2.74 + 1.2.75 diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java index 3ab9225b3..3168cf856 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java @@ -709,12 +709,8 @@ public JSONObject getStructure(@NotNull String table, String method, String tag, if (result != null) { // 加快下次查询,查到值的话组合情况其实是有限的,不属于恶意请求 if (versionedMap == null) { - versionedMap = new TreeMap<>(new Comparator() { - - @Override - public int compare(Integer o1, Integer o2) { - return o2 == null ? -1 : o2.compareTo(o1); // 降序 - } + versionedMap = new TreeMap<>((o1, o2) -> { + return o2 == null ? -1 : o2.compareTo(o1); // 降序 }); } diff --git a/APIJSONORM/src/main/java/apijson/orm/Logic.java b/APIJSONORM/src/main/java/apijson/orm/Logic.java index 593800270..b795ae961 100755 --- a/APIJSONORM/src/main/java/apijson/orm/Logic.java +++ b/APIJSONORM/src/main/java/apijson/orm/Logic.java @@ -108,12 +108,16 @@ public static int getType(char logicChar) { public static int getType(String logicChar) { int type = -1; if (logicChar != null && logicChar.length() == 1) { - if ("|".equals(logicChar)) { - type = 0; - } else if ("&".equals(logicChar)) { - type = 1; - } else if ("!".equals(logicChar)) { - type = 2; + switch (logicChar) { + case "|": + type = 0; + break; + case "&": + type = 1; + break; + case "!": + type = 2; + break; } } return type;