mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 18:55:30 +08:00
restore-jsonparserconfiguration: clean up some whitespace
This commit is contained in:
@@ -115,24 +115,24 @@ public class JSONArray implements Iterable<Object> {
|
|||||||
this.myArrayList.add(x.nextValue());
|
this.myArrayList.add(x.nextValue());
|
||||||
}
|
}
|
||||||
switch (x.nextClean()) {
|
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
|
// array is unclosed. No ']' found, instead EOF
|
||||||
throw x.syntaxError("Expected a ',' or ']'");
|
throw x.syntaxError("Expected a ',' or ']'");
|
||||||
case ',':
|
}
|
||||||
nextChar = x.nextClean();
|
if (nextChar == ']') {
|
||||||
if (nextChar == 0) {
|
|
||||||
// array is unclosed. No ']' found, instead EOF
|
|
||||||
throw x.syntaxError("Expected a ',' or ']'");
|
|
||||||
}
|
|
||||||
if (nextChar == ']') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
x.back();
|
|
||||||
break;
|
|
||||||
case ']':
|
|
||||||
return;
|
return;
|
||||||
default:
|
}
|
||||||
throw x.syntaxError("Expected a ',' or ']'");
|
x.back();
|
||||||
|
break;
|
||||||
|
case ']':
|
||||||
|
return;
|
||||||
|
default:
|
||||||
|
throw x.syntaxError("Expected a ',' or ']'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user