Skip to content

Commit 2e0a813

Browse files
authored
Removed JSONTokener.back()
1 parent f177c97 commit 2e0a813

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

JSONObject.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ public JSONObject(JSONTokener x) throws JSONException {
237237
if (key != null) {
238238
// Check if key exists
239239
if (this.opt(key) != null) {
240-
// back one token to point to the last key character
241-
x.back();
240+
// key already exists
242241
throw x.syntaxError("Duplicate key \"" + key + "\"");
243242
}
244243
// Only add value if non-null

0 commit comments

Comments
 (0)