GeezerVison is showing github.com — Java:升级 APIJSON 和 apijson-framework 分别至 4.4.7 和 4.4.9 · msgui/APIJSON-Demo@25f0bc2
File tree
Expand file treeCollapse file tree
Open diff view settings
src/main/java/apijson/demo
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONBoot/pom.xml +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
5 | 5 |
|
6 | 6 | <groupId>apijson.boot</groupId> |
7 | 7 | <artifactId>apijson-boot</artifactId> |
8 | | - <version>4.4.6</version> |
| 8 | + <version>4.4.9</version> |
9 | 9 | <packaging>jar</packaging> |
10 | 10 |
|
11 | 11 | <name>APIJSONBoot</name> |
|
41 | 41 | <dependency> |
42 | 42 | <groupId>com.github.Tencent</groupId> |
43 | 43 | <artifactId>APIJSON</artifactId> |
44 | | - <version>4.3.1</version> |
| 44 | + <version>4.4.7</version> |
45 | 45 | </dependency> |
46 | 46 | <dependency> |
47 | 47 | <groupId>com.github.APIJSON</groupId> |
48 | 48 | <artifactId>apijson-framework</artifactId> |
49 | | - <version>4.4.6</version> |
| 49 | + <version>4.4.9</version> |
50 | 50 | </dependency> |
51 | 51 | <!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> --> |
52 | 52 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/pom.xml +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
4 | 4 | <groupId>apijson.jfinal</groupId> |
5 | 5 | <artifactId>apijson-final</artifactId> |
6 | 6 | <packaging>jar</packaging> |
7 | | - <version>4.4.6</version> |
| 7 | + <version>4.4.9</version> |
8 | 8 | <name>Demo project for APIJSON Server based on JFinal</name> |
9 | 9 | <url>http://maven.apache.org</url> |
10 | 10 | <dependencies> |
|
24 | 24 | <dependency> |
25 | 25 | <groupId>com.github.Tencent</groupId> |
26 | 26 | <artifactId>APIJSON</artifactId> |
27 | | - <version>4.3.1</version> |
| 27 | + <version>4.4.7</version> |
28 | 28 | </dependency> |
29 | 29 | <dependency> |
30 | 30 | <groupId>com.github.APIJSON</groupId> |
31 | 31 | <artifactId>apijson-framework</artifactId> |
32 | | - <version>4.4.6</version> |
| 32 | + <version>4.4.9</version> |
33 | 33 | </dependency> |
34 | 34 | <!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> --> |
35 | 35 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -52,6 +52,10 @@ public DemoFunctionParser(RequestMethod method, String tag, int version, JSONObj |
52 | 52 | */ |
53 | 53 | public Object verifyIdList(@NotNull JSONObject current, @NotNull String idList) throws Exception { |
54 | 54 | Object obj = current.get(idList); |
| 55 | + if (obj == null) { |
| 56 | + return null; |
| 57 | + } |
| 58 | + |
55 | 59 | if (obj instanceof Collection == false) { |
56 | 60 | throw new IllegalArgumentException(idList + " 不符合 Array 类型! 结构必须是 [] !"); |
57 | 61 | } |
@@ -74,6 +78,10 @@ public Object verifyIdList(@NotNull JSONObject current, @NotNull String idList) |
74 | 78 | */ |
75 | 79 | public Object verifyURLList(@NotNull JSONObject current, @NotNull String urlList) throws Exception { |
76 | 80 | Object obj = current.get(urlList); |
| 81 | + if (obj == null) { |
| 82 | + return null; |
| 83 | + } |
| 84 | + |
77 | 85 | if (obj instanceof Collection == false) { |
78 | 86 | throw new IllegalArgumentException(urlList + " 不符合 Array 类型! 结构必须是 [] !"); |
79 | 87 | } |
|