From 223e328161f5d52fdc66935e3dbb7ff819ff8b73 Mon Sep 17 00:00:00 2001 From: scott Date: Wed, 16 Oct 2019 21:12:02 -0700 Subject: [PATCH] Replace JSONObject constructor string arrays with var args --- JSONObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JSONObject.java b/JSONObject.java index 678a5d6..a6bfcea 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -194,7 +194,7 @@ public class JSONObject { * @param names * An array of strings. */ - public JSONObject(JSONObject jo, String[] names) { + public JSONObject(JSONObject jo, String ... names) { this(names.length); for (int i = 0; i < names.length; i += 1) { try { @@ -378,7 +378,7 @@ public class JSONObject { * An array of strings, the names of the fields to be obtained * from the object. */ - public JSONObject(Object object, String names[]) { + public JSONObject(Object object, String ... names) { this(names.length); Class c = object.getClass(); for (int i = 0; i < names.length; i += 1) {