#863 replace short switch statements with if-else

This commit is contained in:
Simulant
2024-03-05 22:12:57 +01:00
parent 5407423e43
commit c010033591
2 changed files with 6 additions and 10 deletions

View File

@@ -216,12 +216,11 @@ public class JSONObject {
}
c = x.nextClean();
for (;;) {
switch (c) {
case 0:
if (c == 0) {
throw x.syntaxError("A JSONObject text must end with '}'");
case '}':
} else if (c == '}') {
return;
default:
} else {
key = x.nextSimpleValue(c).toString();
}