Commit c65275db5de9c001fe23a10b8d8c1539ef9a3506
1 parent
e8cd979b
Exists in
master
1.fix a bug when json has null
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
build.gradle
@@ -59,7 +59,7 @@ uploadArchives { | @@ -59,7 +59,7 @@ uploadArchives { | ||
59 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | 59 | authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) |
60 | } | 60 | } |
61 | pom.project { | 61 | pom.project { |
62 | - version '1.1.40' | 62 | + version '1.1.41' |
63 | artifactId ARTIFACT_Id | 63 | artifactId ARTIFACT_Id |
64 | groupId GROUP_ID | 64 | groupId GROUP_ID |
65 | packaging TYPE | 65 | packaging TYPE |
src/main/java/com/taover/util/UtilJSON.java
@@ -49,7 +49,7 @@ public class UtilJSON { | @@ -49,7 +49,7 @@ public class UtilJSON { | ||
49 | } | 49 | } |
50 | for(int i=0; i<dataArr.size(); ++i){ | 50 | for(int i=0; i<dataArr.size(); ++i){ |
51 | JSONObject dataItem = dataArr.optJSONObject(i); | 51 | JSONObject dataItem = dataArr.optJSONObject(i); |
52 | - if(dataItem.isNullObject()){ | 52 | + if(isJsonNull(dataItem)){ |
53 | dataArr.remove(i); | 53 | dataArr.remove(i); |
54 | continue; | 54 | continue; |
55 | } | 55 | } |
@@ -87,7 +87,7 @@ public class UtilJSON { | @@ -87,7 +87,7 @@ public class UtilJSON { | ||
87 | } | 87 | } |
88 | for(int i=0; i<dataArr.size(); ++i){ | 88 | for(int i=0; i<dataArr.size(); ++i){ |
89 | JSONObject dataItem = dataArr.optJSONObject(i); | 89 | JSONObject dataItem = dataArr.optJSONObject(i); |
90 | - if(dataItem.isNullObject()){ | 90 | + if(isJsonNull(dataItem)){ |
91 | dataArr.set(i, target); | 91 | dataArr.set(i, target); |
92 | continue; | 92 | continue; |
93 | } | 93 | } |