mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Replace JSONObject constructor string arrays with var args
This commit is contained in:
parent
044b035847
commit
223e328161
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue