diff --git a/JSONObject.java b/JSONObject.java index 678a5d67b..a6bfcea28 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -194,7 +194,7 @@ public 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 JSONObject(Object bean) { * 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) {