From 455787a8fa827aaaf2182b959cd6bbe91a3260b9 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Tue, 26 May 2020 08:30:25 -0400 Subject: [PATCH] Made more corrections to Cookie.ToString. 1. Made Cookie Name and Value properties case insensitive 2. Throws exception on illegal Cookie Name 3. Doesn't emit "false" flag values 4. Properly escape key-value attributes. --- src/main/java/org/json/Cookie.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/json/Cookie.java b/src/main/java/org/json/Cookie.java index 73e6c0f82..196dd71e8 100644 --- a/src/main/java/org/json/Cookie.java +++ b/src/main/java/org/json/Cookie.java @@ -115,7 +115,7 @@ public static JSONObject toJSONObject(String string) throws JSONException { * All other members are ignored. * @param jo A JSONObject * @return A cookie specification string - * @throws JSONException if a called function fails + * @throws JSONException thrown if the cookie has no name. */ public static String toString(JSONObject jo) throws JSONException { StringBuilder sb = new StringBuilder();