Skip to content

Commit

Permalink
restore-jsonparserconfiguration: clean up some whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Leary authored and Sean Leary committed Dec 14, 2024
1 parent 1f308db commit 80b2672
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/main/java/org/json/JSONArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,24 @@ public JSONArray(JSONTokener x, JSONParserConfiguration jsonParserConfiguration)
this.myArrayList.add(x.nextValue());
}
switch (x.nextClean()) {
case 0:
case 0:
// array is unclosed. No ']' found, instead EOF
throw x.syntaxError("Expected a ',' or ']'");
case ',':
nextChar = x.nextClean();
if (nextChar == 0) {
// array is unclosed. No ']' found, instead EOF
throw x.syntaxError("Expected a ',' or ']'");
case ',':
nextChar = x.nextClean();
if (nextChar == 0) {
// array is unclosed. No ']' found, instead EOF
throw x.syntaxError("Expected a ',' or ']'");
}
if (nextChar == ']') {
return;
}
x.back();
break;
case ']':
}
if (nextChar == ']') {
return;
default:
throw x.syntaxError("Expected a ',' or ']'");
}
x.back();
break;
case ']':
return;
default:
throw x.syntaxError("Expected a ',' or ']'");
}
}
}
Expand Down

0 comments on commit 80b2672

Please sign in to comment.