From e5e565ebe4ec8b8bbd461d4c87a990af706cbf61 Mon Sep 17 00:00:00 2001 From: Akarshit Wal Date: Sun, 28 Feb 2016 17:09:41 +0530 Subject: [PATCH 1/2] Changed the access modifier of get() --- core/src/processing/data/JSONArray.java | 2 +- core/src/processing/data/JSONObject.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/processing/data/JSONArray.java b/core/src/processing/data/JSONArray.java index 0ec016d3f..b1c155f85 100644 --- a/core/src/processing/data/JSONArray.java +++ b/core/src/processing/data/JSONArray.java @@ -263,7 +263,7 @@ public class JSONArray { * @return An object value. * @throws JSONException If there is no value for the index. */ - private Object get(int index) { + public Object get(int index) { Object object = opt(index); if (object == null) { throw new RuntimeException("JSONArray[" + index + "] not found."); diff --git a/core/src/processing/data/JSONObject.java b/core/src/processing/data/JSONObject.java index 8b8d2f170..cedf11e86 100644 --- a/core/src/processing/data/JSONObject.java +++ b/core/src/processing/data/JSONObject.java @@ -540,7 +540,7 @@ public class JSONObject { * @return The object associated with the key. * @throws JSONException if the key is not found. */ - private Object get(String key) { + public Object get(String key) { if (key == null) { throw new RuntimeException("Null key."); } From 411c031a68c5be5d1a02b20f39ead87762b0ab4c Mon Sep 17 00:00:00 2001 From: Akarshit Wal Date: Sun, 28 Feb 2016 21:28:50 +0530 Subject: [PATCH 2/2] Changed the access modifier of put() and putOnce() --- core/src/processing/data/JSONObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/processing/data/JSONObject.java b/core/src/processing/data/JSONObject.java index cedf11e86..2d27c8f1f 100644 --- a/core/src/processing/data/JSONObject.java +++ b/core/src/processing/data/JSONObject.java @@ -1302,7 +1302,7 @@ public class JSONObject { * @throws JSONException If the value is non-finite number * or if the key is null. */ - private JSONObject put(String key, Object value) { + public JSONObject put(String key, Object value) { String pooled; if (key == null) { throw new RuntimeException("Null key."); @@ -1335,7 +1335,7 @@ public class JSONObject { * @return his. * @throws JSONException if the key is a duplicate */ - private JSONObject putOnce(String key, Object value) { + public JSONObject putOnce(String key, Object value) { if (key != null && value != null) { if (this.opt(key) != null) { throw new RuntimeException("Duplicate key \"" + key + "\"");