mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
remove unneeded casts
This commit is contained in:
parent
30c1bd16ba
commit
71c6dd1e34
1 changed files with 3 additions and 3 deletions
|
@ -325,14 +325,14 @@ public class JSONWriter {
|
||||||
return "null";
|
return "null";
|
||||||
}
|
}
|
||||||
if (value instanceof JSONString) {
|
if (value instanceof JSONString) {
|
||||||
Object object;
|
String object;
|
||||||
try {
|
try {
|
||||||
object = ((JSONString) value).toJSONString();
|
object = ((JSONString) value).toJSONString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new JSONException(e);
|
throw new JSONException(e);
|
||||||
}
|
}
|
||||||
if (object instanceof String) {
|
if (object != null) {
|
||||||
return (String) object;
|
return object;
|
||||||
}
|
}
|
||||||
throw new JSONException("Bad value from toJSONString: " + object);
|
throw new JSONException("Bad value from toJSONString: " + object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue