mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
6463998: Undocumented NullPointerExeption from Float.parseFloat and Double.parseDouble
Reviewed-by: lancea, iris
This commit is contained in:
parent
8c000e858b
commit
b8fae2d33c
2 changed files with 5 additions and 3 deletions
|
@ -529,6 +529,7 @@ public final class Double extends Number implements Comparable<Double> {
|
|||
* @param s the string to be parsed.
|
||||
* @return the {@code double} value represented by the string
|
||||
* argument.
|
||||
* @throws NullPointerException if the string is null
|
||||
* @throws NumberFormatException if the string does not contain
|
||||
* a parsable {@code double}.
|
||||
* @see java.lang.Double#valueOf(String)
|
||||
|
|
|
@ -438,12 +438,13 @@ public final class Float extends Number implements Comparable<Float> {
|
|||
* represented by the specified {@code String}, as performed
|
||||
* by the {@code valueOf} method of class {@code Float}.
|
||||
*
|
||||
* @param s the string to be parsed.
|
||||
* @param s the string to be parsed.
|
||||
* @return the {@code float} value represented by the string
|
||||
* argument.
|
||||
* @throws NumberFormatException if the string does not contain a
|
||||
* @throws NullPointerException if the string is null
|
||||
* @throws NumberFormatException if the string does not contain a
|
||||
* parsable {@code float}.
|
||||
* @see java.lang.Float#valueOf(String)
|
||||
* @see java.lang.Float#valueOf(String)
|
||||
* @since 1.2
|
||||
*/
|
||||
public static float parseFloat(String s) throws NumberFormatException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue