Skip to content

Commit

Permalink
Merge pull request #494 from spaffrath/replace_string_arrays_with_var…
Browse files Browse the repository at this point in the history
…_args

Replace JSONObject constructor string arrays with var args
  • Loading branch information
stleary committed Nov 6, 2019
2 parents 9afa90d + 223e328 commit 4b49bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JSONObject.java
Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4b49bc9

Please sign in to comment.