src/de/general/json/JSONHelper.java
protected static boolean testValidity(Object o)
	{
        if (o != null) {
            if (o instanceof Double) {
                if (((Double) o).isInfinite() || ((Double) o).isNaN()) {
                    return false;
                }
            } else if (o instanceof Float) {
                if (((Float) o).isInfinite() || ((Float) o).isNaN()) {
                    return false;
                }
            }
			return true;
        }
		return false;
    }
/**
	 * Throw an exception if the object is a NaN or infinite number.
	 *
	 * @param o
	 * The object to test.
	 * @throws JSONException
	 * If o is a non-finite number.
	 */
Throw an exception if the object is a NaN or infinite number.
@param o
The object to test.
@throws JSONException
If o is a non-finite number.
Throw an exception if the object is a NaN or infinite number . @param o The object to test . @throws JSONException If o is a non - finite number .
protected static boolean testValidity(Object o)
	{
        if (o != null) {
            if (o instanceof Double) {
                if (((Double) o).isInfinite() || ((Double) o).isNaN()) {
                    return false;
                }
            } else if (o instanceof Float) {
                if (((Float) o).isInfinite() || ((Float) o).isNaN()) {
                    return false;
                }
            }
			return true;
        }
		return false;
    }
protected static boolean testValidity ( Object o ) { if ( o != null ) { if ( o instanceof Double ) { if ( ( ( Double ) o ) . isInfinite ( ) || ( ( Double ) o ) . isNaN ( ) ) { return false ; } } else if ( o instanceof Float ) { if ( ( ( Float ) o ) . isInfinite ( ) || ( ( Float ) o ) . isNaN ( ) ) { return false ; } } return true ; } return false ; }
Throw an exception if the object is a NaN or infinite number.
Throw an exception if the object is a NaN or infinite number .