mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Merge pull request #4336 from Akarshit/bugifx-accessModifier
Changed the access modifier of get()
This commit is contained in:
@@ -263,7 +263,7 @@ public class JSONArray {
|
||||
* @return An object value.
|
||||
* @throws RuntimeException 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.");
|
||||
|
||||
@@ -537,7 +537,7 @@ public class JSONObject {
|
||||
* @return The object associated with the key.
|
||||
* @throws RuntimeException if the key is not found.
|
||||
*/
|
||||
private Object get(String key) {
|
||||
public Object get(String key) {
|
||||
if (key == null) {
|
||||
throw new RuntimeException("Null key.");
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ public class JSONObject {
|
||||
* @throws RuntimeException 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.");
|
||||
@@ -1334,7 +1334,7 @@ public class JSONObject {
|
||||
* @throws RuntimeException if the key is a duplicate, or if
|
||||
* {@link #put(String,Object)} throws.
|
||||
*/
|
||||
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 + "\"");
|
||||
|
||||
Reference in New Issue
Block a user