< prev index next >
jdk/src/java.base/share/classes/java/text/Format.java
Print this page
@@ -224,10 +224,11 @@
* @param pos A <code>ParsePosition</code> object with index and error
* 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} is null.
*/
public abstract Object parseObject (String source, ParsePosition pos);
/**
* Parses text from the beginning of the given string to produce an object.
@@ -235,10 +236,11 @@
*
* @param source A <code>String</code> whose beginning should be parsed.
* @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);
Object result = parseObject(source, pos);
if (pos.index == 0) {
< prev index next >