Revert "#863 replace short switch statements with if-else"

This reverts commit c010033591.
This commit is contained in:
Simulant
2024-03-10 21:08:10 +01:00
parent eda08415ca
commit 045324ab42
2 changed files with 10 additions and 6 deletions

View File

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