@@ -1661,12 +1661,10 @@ public static String valueToString(Object value) throws JSONException {
1661
1661
return value .toString ();
1662
1662
}
1663
1663
if (value instanceof Map ) {
1664
- @ SuppressWarnings ("unchecked" )
1665
1664
Map <?, ?> map = (Map <?, ?>) value ;
1666
1665
return new JSONObject (map ).toString ();
1667
1666
}
1668
1667
if (value instanceof Collection ) {
1669
- @ SuppressWarnings ("unchecked" )
1670
1668
Collection <?> coll = (Collection <?>) value ;
1671
1669
return new JSONArray (coll ).toString ();
1672
1670
}
@@ -1705,15 +1703,13 @@ public static Object wrap(Object object) {
1705
1703
}
1706
1704
1707
1705
if (object instanceof Collection ) {
1708
- @ SuppressWarnings ("unchecked" )
1709
1706
Collection <?> coll = (Collection <?>) object ;
1710
1707
return new JSONArray (coll );
1711
1708
}
1712
1709
if (object .getClass ().isArray ()) {
1713
1710
return new JSONArray (object );
1714
1711
}
1715
1712
if (object instanceof Map ) {
1716
- @ SuppressWarnings ("unchecked" )
1717
1713
Map <?, ?> map = (Map <?, ?>) object ;
1718
1714
return new JSONObject (map );
1719
1715
}
@@ -1753,11 +1749,9 @@ static final Writer writeValue(Writer writer, Object value,
1753
1749
} else if (value instanceof JSONArray ) {
1754
1750
((JSONArray ) value ).write (writer , indentFactor , indent );
1755
1751
} else if (value instanceof Map ) {
1756
- @ SuppressWarnings ("unchecked" )
1757
1752
Map <?, ?> map = (Map <?, ?>) value ;
1758
1753
new JSONObject (map ).write (writer , indentFactor , indent );
1759
1754
} else if (value instanceof Collection ) {
1760
- @ SuppressWarnings ("unchecked" )
1761
1755
Collection <?> coll = (Collection <?>) value ;
1762
1756
new JSONArray (coll ).write (writer , indentFactor , indent );
1763
1757
} else if (value .getClass ().isArray ()) {
0 commit comments