2929/**
3030 * A modifiable set of name/value mappings. Names are unique, non-null strings. Values may be any mix of
3131 * {@link JSONObject JSONObjects}, {@link JSONArray JSONArrays}, Strings, Booleans, Integers, Longs, Doubles or
32- * {@link #NULL}. Values may not be {@code null}, {@link Double#isNaN() NaNs}, {@link Double#isInfinite() infinities},
33- * or of any type not listed here.
32+ * {@link #NULL}. Values may not be {@literal null}, {@link Double#isNaN() NaNs}, {@link Double#isInfinite()
33+ * infinities}, or of any type not listed here.
3434 * <p>
3535 * This class can coerce values to another type when requested.
3636 * <ul>
5656 * if the requested name has no value or if the value cannot be coerced to the requested type.
5757 * </ul>
5858 * <p>
59- * <strong>Warning:</strong> this class represents null in two incompatible ways: the standard Java {@code null}
59+ * <strong>Warning:</strong> this class represents null in two incompatible ways: the standard Java {@literal null}
6060 * reference, and the sentinel value {@link JSONObject#NULL}. In particular, calling {@code put(name, null)} removes the
6161 * named entry from the object but {@code put(name, JSONObject.NULL)} stores an entry whose value is
6262 * {@code JSONObject.NULL}.
@@ -71,7 +71,7 @@ class JSONObject {
7171 private static final Double NEGATIVE_ZERO = -0d ;
7272
7373 /**
74- * A sentinel value used to explicitly define a name with no value. Unlike {@code null}, names with this value:
74+ * A sentinel value used to explicitly define a name with no value. Unlike {@literal null}, names with this value:
7575 * <ul>
7676 * <li>show up in the {@link #names} array
7777 * <li>show up in the {@link #keys} iterator
@@ -80,8 +80,8 @@ class JSONObject {
8080 * <li>are included in the encoded JSON string.
8181 * </ul>
8282 * <p>
83- * This value violates the general contract of {@link Object#equals} by returning true when compared to {@code null}.
84- * Its {@link #toString} method returns "null".
83+ * This value violates the general contract of {@link Object#equals} by returning true when compared to
84+ * {@literal null}. Its {@link #toString} method returns "null".
8585 */
8686 public static final Object NULL = new Object () {
8787
@@ -242,11 +242,11 @@ public JSONObject put(String name, long value) throws JSONException {
242242
243243 /**
244244 * Maps {@code name} to {@code value}, clobbering any existing name/value mapping with the same name. If the value is
245- * {@code null}, any existing mapping for {@code name} is removed.
245+ * {@literal null}, any existing mapping for {@code name} is removed.
246246 *
247247 * @param name the name of the property
248248 * @param value a {@link JSONObject}, {@link JSONArray}, String, Boolean, Integer, Long, Double, {@link #NULL}, or
249- * {@code null}. May not be {@link Double#isNaN() NaNs} or {@link Double#isInfinite() infinities}.
249+ * {@literal null}. May not be {@link Double#isNaN() NaNs} or {@link Double#isInfinite() infinities}.
250250 * @return this object.
251251 * @throws JSONException if an error occurs
252252 */
@@ -370,7 +370,7 @@ public Object get(String name) throws JSONException {
370370 * Returns the value mapped by {@code name}, or null if no such mapping exists.
371371 *
372372 * @param name the name of the property
373- * @return the value or {@code null}
373+ * @return the value or {@literal null}
374374 */
375375 public Object opt (String name ) {
376376 return this .nameValuePairs .get (name );
@@ -397,7 +397,7 @@ public boolean getBoolean(String name) throws JSONException {
397397 * false otherwise.
398398 *
399399 * @param name the name of the property
400- * @return the value or {@code null}
400+ * @return the value or {@literal null}
401401 */
402402 public boolean optBoolean (String name ) {
403403 return optBoolean (name , false );
@@ -607,7 +607,7 @@ public JSONArray getJSONArray(String name) throws JSONException {
607607 * JSONArray}. Returns null otherwise.
608608 *
609609 * @param name the name of the property
610- * @return the value or {@code null}
610+ * @return the value or {@literal null}
611611 */
612612 public JSONArray optJSONArray (String name ) {
613613 Object object = opt (name );
@@ -637,7 +637,7 @@ public JSONObject getJSONObject(String name) throws JSONException {
637637 * JSONObject}. Returns null otherwise.
638638 *
639639 * @param name the name of the property
640- * @return the value or {@code null}
640+ * @return the value or {@literal null}
641641 */
642642 public JSONObject optJSONObject (String name ) {
643643 Object object = opt (name );
@@ -794,7 +794,7 @@ public static String quote(String data) {
794794 * Wraps the given object if necessary.
795795 * <p>
796796 * If the object is null or, returns {@link #NULL}. If the object is a {@code JSONArray} or {@code JSONObject}, no
797- * wrapping is necessary. If the object is {@code NULL }, no wrapping is necessary. If the object is an array or
797+ * wrapping is necessary. If the object is {@literal null }, no wrapping is necessary. If the object is an array or
798798 * {@code Collection}, returns an equivalent {@code JSONArray}. If the object is a {@code Map}, returns an equivalent
799799 * {@code JSONObject}. If the object is a primitive wrapper type or {@code String}, returns the object. Otherwise if
800800 * the object is from a {@code java} package, returns the result of {@code toString}. If wrapping fails, returns null.
0 commit comments