8073211: javadoc of Format parseObject methods should specify NullPointerExceptions
Reviewed-by: naoto, peytoia, okutsu
This commit is contained in:
parent
fb7027bca9
commit
0138e1fe6e
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user