Loading... (original) (raw)

The valueOf methods in Float and Double convert (essentially) strings of floating-point literals into floating-point values. The set of accepted strings does *not* include simple integer strings like "45". However, in clear violation of the specification, the current implementation accepts such strings instead of throwing a NumberFormatException.

duplicates

Bug - A problem which impairs or prevents the functions of the product. JDK-4096613 Float and Double.valueOf(String) don't throw NumberFormatException.

relates to

Bug - A problem which impairs or prevents the functions of the product. JDK-4705734 {Float, Double}.valueOf use broken test for whitespace characters