8073211: javadoc of Format parseObject methods should specify NullPointerExceptions

Reviewed-by: naoto, peytoia, okutsu
This commit is contained in:
Naveen Kumar 2015-11-24 13:22:00 +09:00 committed by Masayoshi Okutsu
parent fb7027bca9
commit 0138e1fe6e
4 changed files with 5 additions and 4 deletions

View File

@ -418,7 +418,7 @@ public abstract class DateFormat extends Format {
* 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);

View File

@ -225,7 +225,7 @@ public abstract class Format implements Serializable, Cloneable {
* 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 @@ public abstract class Format implements Serializable, Cloneable {
* @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);

View File

@ -1068,7 +1068,7 @@ public class MessageFormat extends Format {
* 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);

View File

@ -271,7 +271,7 @@ public abstract class NumberFormat extends Format {
* 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) {