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()) {
|
||||
case ';':
|
||||
case ',':
|
||||
c = x.nextClean();
|
||||
if (c == 0) {
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
}
|
||||
if (c == '}') {
|
||||
if (x.nextClean() == '}') {
|
||||
return;
|
||||
}
|
||||
if (x.end()) {
|
||||
throw x.syntaxError("A JSONObject text must end with '}'");
|
||||
}
|
||||
x.back();
|
||||
break;
|
||||
case '}':
|
||||
|
Reference in New Issue
Block a user