8073211: javadoc of Format parseObject methods should specify NullPointerExceptions
authorokutsu
Tue, 24 Nov 2015 13:22:00 +0900
changeset 34328 0534cb944d0e
parent 34327 50693d25f4a7
child 34329 7dc6604ffaa5
8073211: javadoc of Format parseObject methods should specify NullPointerExceptions Reviewed-by: naoto, peytoia, okutsu Contributed-by: Naveen Kumar <naveen.ah.kumar@oracle.com>
jdk/src/java.base/share/classes/java/text/DateFormat.java
jdk/src/java.base/share/classes/java/text/Format.java
jdk/src/java.base/share/classes/java/text/MessageFormat.java
jdk/src/java.base/share/classes/java/text/NumberFormat.java
--- a/jdk/src/java.base/share/classes/java/text/DateFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/text/DateFormat.java	Tue Nov 24 13:22:00 2015 +0900
@@ -418,7 +418,7 @@
      *            index information as described above.
      * @return A <code>Date</code> parsed from the string. In case of
      *         error, returns null.
-     * @exception NullPointerException if <code>pos</code> is null.
+     * @throws NullPointerException if {@code source} or {@code pos} is null.
      */
     public Object parseObject(String source, ParsePosition pos) {
         return parse(source, pos);
--- a/jdk/src/java.base/share/classes/java/text/Format.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/text/Format.java	Tue Nov 24 13:22:00 2015 +0900
@@ -225,7 +225,7 @@
      *            index information as described above.
      * @return An <code>Object</code> parsed from the string. In case of
      *         error, returns null.
-     * @exception NullPointerException if <code>pos</code> is null.
+     * @throws NullPointerException if {@code source} or {@code pos} is null.
      */
     public abstract Object parseObject (String source, ParsePosition pos);
 
@@ -237,6 +237,7 @@
      * @return An <code>Object</code> parsed from the string.
      * @exception ParseException if the beginning of the specified string
      *            cannot be parsed.
+     * @throws NullPointerException if {@code source} is null.
      */
     public Object parseObject(String source) throws ParseException {
         ParsePosition pos = new ParsePosition(0);
--- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Tue Nov 24 13:22:00 2015 +0900
@@ -1068,7 +1068,7 @@
      *            index information as described above.
      * @return An <code>Object</code> array parsed from the string. In case of
      *         error, returns null.
-     * @exception NullPointerException if <code>pos</code> is null.
+     * @throws NullPointerException if {@code source} or {@code pos} is null.
      */
     public Object parseObject(String source, ParsePosition pos) {
         return parse(source, pos);
--- a/jdk/src/java.base/share/classes/java/text/NumberFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/text/NumberFormat.java	Tue Nov 24 13:22:00 2015 +0900
@@ -271,7 +271,7 @@
      *            index information as described above.
      * @return A <code>Number</code> parsed from the string. In case of
      *         error, returns null.
-     * @exception NullPointerException if <code>pos</code> is null.
+     * @throws NullPointerException if {@code source} or {@code pos} is null.
      */
     @Override
     public final Object parseObject(String source, ParsePosition pos) {