Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace JSONObject constructor string arrays with var args #494

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions JSONObject.java
Original file line number Diff line number Diff line change
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