6463998: Undocumented NullPointerExeption from Float.parseFloat and Double.parseDouble
authordarcy
Wed, 15 Jul 2009 14:43:13 -0700
changeset 3312 d8cd9665ece8
parent 3311 a219a6c036a6
child 3313 0d2503de51fe
6463998: Undocumented NullPointerExeption from Float.parseFloat and Double.parseDouble Reviewed-by: lancea, iris
jdk/src/share/classes/java/lang/Double.java
jdk/src/share/classes/java/lang/Float.java
--- a/jdk/src/share/classes/java/lang/Double.java	Wed Jul 15 12:08:55 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Double.java	Wed Jul 15 14:43:13 2009 -0700
@@ -529,6 +529,7 @@
      * @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)
--- a/jdk/src/share/classes/java/lang/Float.java	Wed Jul 15 12:08:55 2009 -0700
+++ b/jdk/src/share/classes/java/lang/Float.java	Wed Jul 15 14:43:13 2009 -0700
@@ -438,12 +438,13 @@
      * 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 {