mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
removed 6 unnecessary @SuppressWarnings("unchecked") annotations.
This commit is contained in:
parent
25b5aa7ef2
commit
5ddc515679
1 changed files with 0 additions and 6 deletions
|
@ -1661,12 +1661,10 @@ public class JSONObject {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
}
|
}
|
||||||
if (value instanceof Map) {
|
if (value instanceof Map) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Map<?, ?> map = (Map<?, ?>) value;
|
Map<?, ?> map = (Map<?, ?>) value;
|
||||||
return new JSONObject(map).toString();
|
return new JSONObject(map).toString();
|
||||||
}
|
}
|
||||||
if (value instanceof Collection) {
|
if (value instanceof Collection) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Collection<?> coll = (Collection<?>) value;
|
Collection<?> coll = (Collection<?>) value;
|
||||||
return new JSONArray(coll).toString();
|
return new JSONArray(coll).toString();
|
||||||
}
|
}
|
||||||
|
@ -1705,7 +1703,6 @@ public class JSONObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object instanceof Collection) {
|
if (object instanceof Collection) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Collection<?> coll = (Collection<?>) object;
|
Collection<?> coll = (Collection<?>) object;
|
||||||
return new JSONArray(coll);
|
return new JSONArray(coll);
|
||||||
}
|
}
|
||||||
|
@ -1713,7 +1710,6 @@ public class JSONObject {
|
||||||
return new JSONArray(object);
|
return new JSONArray(object);
|
||||||
}
|
}
|
||||||
if (object instanceof Map) {
|
if (object instanceof Map) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Map<?, ?> map = (Map<?, ?>) object;
|
Map<?, ?> map = (Map<?, ?>) object;
|
||||||
return new JSONObject(map);
|
return new JSONObject(map);
|
||||||
}
|
}
|
||||||
|
@ -1753,11 +1749,9 @@ public class JSONObject {
|
||||||
} else if (value instanceof JSONArray) {
|
} else if (value instanceof JSONArray) {
|
||||||
((JSONArray) value).write(writer, indentFactor, indent);
|
((JSONArray) value).write(writer, indentFactor, indent);
|
||||||
} else if (value instanceof Map) {
|
} else if (value instanceof Map) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Map<?, ?> map = (Map<?, ?>) value;
|
Map<?, ?> map = (Map<?, ?>) value;
|
||||||
new JSONObject(map).write(writer, indentFactor, indent);
|
new JSONObject(map).write(writer, indentFactor, indent);
|
||||||
} else if (value instanceof Collection) {
|
} else if (value instanceof Collection) {
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
Collection<?> coll = (Collection<?>) value;
|
Collection<?> coll = (Collection<?>) value;
|
||||||
new JSONArray(coll).write(writer, indentFactor, indent);
|
new JSONArray(coll).write(writer, indentFactor, indent);
|
||||||
} else if (value.getClass().isArray()) {
|
} else if (value.getClass().isArray()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue