mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 02:35:33 +08:00
Apply simplification suggested by @johnjaylward.
This commit is contained in:
@@ -253,13 +253,12 @@ public class JSONObject {
|
|||||||
switch (x.nextClean()) {
|
switch (x.nextClean()) {
|
||||||
case ';':
|
case ';':
|
||||||
case ',':
|
case ',':
|
||||||
c = x.nextClean();
|
if (x.nextClean() == '}') {
|
||||||
if (c == 0) {
|
|
||||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
|
||||||
}
|
|
||||||
if (c == '}') {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (x.end()) {
|
||||||
|
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||||
|
}
|
||||||
x.back();
|
x.back();
|
||||||
break;
|
break;
|
||||||
case '}':
|
case '}':
|
||||||
|
Reference in New Issue
Block a user