From 2e0a8137bd911736ded8bda32c07203a0a97e9a6 Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 14 Aug 2017 13:01:31 -0400 Subject: [PATCH] Removed JSONTokener.back() --- JSONObject.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/JSONObject.java b/JSONObject.java index a55ecf8..1b7b0a1 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -237,8 +237,7 @@ public class JSONObject { if (key != null) { // Check if key exists if (this.opt(key) != null) { - // back one token to point to the last key character - x.back(); + // key already exists throw x.syntaxError("Duplicate key \"" + key + "\""); } // Only add value if non-null