8317265: ListFormat::format specification could be made clearer regarding handling IllegalArgumentException.

Reviewed-by: joehw
This commit is contained in:
Naoto Sato 2023-10-03 18:32:57 +00:00
parent cfabcbf858
commit 1809b8cdd6

@ -353,8 +353,8 @@ public final class ListFormat extends Format {
* @return the string buffer passed in as {@code toAppendTo},
* with formatted text appended
* @throws NullPointerException if {@code obj} or {@code toAppendTo} is null
* @throws IllegalArgumentException if the given object cannot
* be formatted
* @throws IllegalArgumentException if {@code obj} is neither a {@code List}
* nor an array of {@code Object}s, or its length is zero.
*/
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {