Returns the input if it is a JSON-permissible value; throws otherwise.
(double d)
| 21 | * Returns the input if it is a JSON-permissible value; throws otherwise. |
| 22 | */ |
| 23 | static double checkDouble(double d) throws JSONException { |
| 24 | if (Double.isInfinite(d) || Double.isNaN(d)) { |
| 25 | throw new JSONException("Forbidden numeric value: " + d); |
| 26 | } |
| 27 | return d; |
| 28 | } |
| 29 | |
| 30 | static Boolean toBoolean(Object value) { |
| 31 | if (value instanceof Boolean) { |
no outgoing calls
no test coverage detected