mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
restore-jsonparserconfiguration: clean up some whitespace
This commit is contained in:
parent
1f308db7c4
commit
80b2672f77
@ -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 ']'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user