changeset 13116:0c0366bc27b3

8073211: javadoc of Format parseObject methods should specify NullPointerExceptions Reviewed-by: naoto, peytoia, okutsu Contributed-by: Naveen Kumar <naveen.ah.kumar@oracle.com>
author okutsu
date Tue, 24 Nov 2015 13:22:00 +0900
parents 25b577ea72d5
children 1326072e44bf
files src/java.base/share/classes/java/text/DateFormat.java src/java.base/share/classes/java/text/Format.java src/java.base/share/classes/java/text/MessageFormat.java src/java.base/share/classes/java/text/NumberFormat.java
diffstat 4 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/text/DateFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/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/src/java.base/share/classes/java/text/Format.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/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/src/java.base/share/classes/java/text/MessageFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/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/src/java.base/share/classes/java/text/NumberFormat.java	Mon Nov 23 11:49:04 2015 -0800
+++ b/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) {