From 9ddf09e18741ad8ac915377408c40693707491f2 Mon Sep 17 00:00:00 2001 From: Daniel Mills Date: Sat, 3 Jul 2021 01:49:55 -0400 Subject: [PATCH] JSON Tweaks --- src/main/java/com/volmit/iris/util/JSONArray.java | 12 ++++++------ src/main/java/com/volmit/iris/util/JSONObject.java | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/volmit/iris/util/JSONArray.java b/src/main/java/com/volmit/iris/util/JSONArray.java index ed935bcc3..8f7e6fdb4 100644 --- a/src/main/java/com/volmit/iris/util/JSONArray.java +++ b/src/main/java/com/volmit/iris/util/JSONArray.java @@ -843,7 +843,7 @@ public class JSONArray implements Iterable */ public JSONArray put(double value) throws JSONException { - Double d = new Double(value); + Double d = value; JSONObject.testValidity(d); this.put(d); return this; @@ -858,7 +858,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int value) { - this.put(new Integer(value)); + this.put(value); return this; } @@ -871,7 +871,7 @@ public class JSONArray implements Iterable */ public JSONArray put(long value) { - this.put(new Long(value)); + this.put(value); return this; } @@ -956,7 +956,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, double value) throws JSONException { - this.put(index, new Double(value)); + this.put(index, value); return this; } @@ -975,7 +975,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, int value) throws JSONException { - this.put(index, new Integer(value)); + this.put(index, value); return this; } @@ -994,7 +994,7 @@ public class JSONArray implements Iterable */ public JSONArray put(int index, long value) throws JSONException { - this.put(index, new Long(value)); + this.put(index, value); return this; } diff --git a/src/main/java/com/volmit/iris/util/JSONObject.java b/src/main/java/com/volmit/iris/util/JSONObject.java index 3ab4a6115..91a56aacb 100644 --- a/src/main/java/com/volmit/iris/util/JSONObject.java +++ b/src/main/java/com/volmit/iris/util/JSONObject.java @@ -1352,7 +1352,7 @@ public class JSONObject */ public JSONObject put(String key, double value) throws JSONException { - this.put(key, new Double(value)); + this.put(key, value); return this; }