Skip to content

Commit 5ddc515

Browse files
author
Lukas Treyer
committed
removed 6 unnecessary @SuppressWarnings("unchecked") annotations.
1 parent 25b5aa7 commit 5ddc515

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

JSONObject.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)