File tree Expand file tree Collapse file tree 4 files changed +24
-3
lines changed Expand file tree Collapse file tree 4 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ public class CDL {
2727
2828 /**
2929 * Constructs a new CDL object.
30+ * @deprecated (Utility class cannot be instantiated)
3031 */
32+ @ Deprecated
3133 public CDL () {
3234 }
3335
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ public class Cookie {
1717
1818 /**
1919 * Constructs a new Cookie object.
20+ * @deprecated (Utility class cannot be instantiated)
2021 */
22+ @ Deprecated ()
2123 public Cookie () {
2224 }
2325
Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ public class CookieList {
1313
1414 /**
1515 * Constructs a new CookieList object.
16+ * @deprecated (Utility class cannot be instantiated)
1617 */
18+ @ Deprecated
1719 public CookieList () {
1820 }
1921
Original file line number Diff line number Diff line change @@ -16,10 +16,13 @@ public class JSONML {
1616
1717 /**
1818 * Constructs a new JSONML object.
19+ * @deprecated (Utility class cannot be instantiated)
1920 */
21+ @ Deprecated
2022 public JSONML () {
2123 }
2224
25+
2326 /**
2427 * Parse XML values and store them in a JSONArray.
2528 * @param x The XMLTokener containing the source string.
@@ -239,9 +242,21 @@ private static Object parse(
239242 }
240243 } else {
241244 if (ja != null ) {
242- ja .put (token instanceof String
243- ? (config .isKeepStrings () ? XML .unescape ((String )token ) : XML .stringToValue ((String )token ))
244- : token );
245+ Object value ;
246+
247+ if (token instanceof String ) {
248+ String strToken = (String ) token ;
249+ if (config .isKeepStrings ()) {
250+ value = XML .unescape (strToken );
251+ } else {
252+ value = XML .stringToValue (strToken );
253+ }
254+ } else {
255+ value = token ;
256+ }
257+
258+ ja .put (value );
259+
245260 }
246261 }
247262 }
You can’t perform that action at this time.
0 commit comments