Skip to content

Commit d92bc67

Browse files
committed
Fix jsonToObject method
1 parent 61476f6 commit d92bc67

File tree

4 files changed

+1
-1
lines changed

4 files changed

+1
-1
lines changed
254 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
38 Bytes
Binary file not shown.

src/main/java/icu/jnet/whatsjava/WAMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static Object[] jsonToObject(String json) {
5757
JsonArray node = JsonParser.parseString(json).getAsJsonArray();
5858
Object[] objects = null;
5959

60-
if(node.get(1) != null) {
60+
if(!node.get(1).isJsonNull() && !node.get(2).isJsonNull()) {
6161
JsonObject attributes = node.get(1).getAsJsonObject();
6262
// Attributes key values
6363
Set<String> keys = attributes.keySet();

0 commit comments

Comments
 (0)