@@ -1661,12 +1661,10 @@ public static String valueToString(Object value) throws JSONException {
16611661 return value .toString ();
16621662 }
16631663 if (value instanceof Map ) {
1664- @ SuppressWarnings ("unchecked" )
16651664 Map <?, ?> map = (Map <?, ?>) value ;
16661665 return new JSONObject (map ).toString ();
16671666 }
16681667 if (value instanceof Collection ) {
1669- @ SuppressWarnings ("unchecked" )
16701668 Collection <?> coll = (Collection <?>) value ;
16711669 return new JSONArray (coll ).toString ();
16721670 }
@@ -1705,15 +1703,13 @@ public static Object wrap(Object object) {
17051703 }
17061704
17071705 if (object instanceof Collection ) {
1708- @ SuppressWarnings ("unchecked" )
17091706 Collection <?> coll = (Collection <?>) object ;
17101707 return new JSONArray (coll );
17111708 }
17121709 if (object .getClass ().isArray ()) {
17131710 return new JSONArray (object );
17141711 }
17151712 if (object instanceof Map ) {
1716- @ SuppressWarnings ("unchecked" )
17171713 Map <?, ?> map = (Map <?, ?>) object ;
17181714 return new JSONObject (map );
17191715 }
@@ -1753,11 +1749,9 @@ static final Writer writeValue(Writer writer, Object value,
17531749 } else if (value instanceof JSONArray ) {
17541750 ((JSONArray ) value ).write (writer , indentFactor , indent );
17551751 } else if (value instanceof Map ) {
1756- @ SuppressWarnings ("unchecked" )
17571752 Map <?, ?> map = (Map <?, ?>) value ;
17581753 new JSONObject (map ).write (writer , indentFactor , indent );
17591754 } else if (value instanceof Collection ) {
1760- @ SuppressWarnings ("unchecked" )
17611755 Collection <?> coll = (Collection <?>) value ;
17621756 new JSONArray (coll ).write (writer , indentFactor , indent );
17631757 } else if (value .getClass ().isArray ()) {
0 commit comments