Skip to content

Commit 223e328

Browse files
author
scott
committed
Replace JSONObject constructor string arrays with var args
1 parent 044b035 commit 223e328

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

JSONObject.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public JSONObject() {
194194
* @param names
195195
* An array of strings.
196196
*/
197-
public JSONObject(JSONObject jo, String[] names) {
197+
public JSONObject(JSONObject jo, String ... names) {
198198
this(names.length);
199199
for (int i = 0; i < names.length; i += 1) {
200200
try {
@@ -378,7 +378,7 @@ public JSONObject(Object bean) {
378378
* An array of strings, the names of the fields to be obtained
379379
* from the object.
380380
*/
381-
public JSONObject(Object object, String names[]) {
381+
public JSONObject(Object object, String ... names) {
382382
this(names.length);
383383
Class<?> c = object.getClass();
384384
for (int i = 0; i < names.length; i += 1) {

0 commit comments

Comments
 (0)