Summary
Clarify the @throws IllegalArgumentException
clause of 3-arg ListFormat::format()
Problem
The current wording is a bit unclear when the exception is thrown.
Solution
Explicitly define the conditions for the exception, i.e., IllegalArgumentException
is thrown if the given object is neither a List nor an array of Objects, or its length is zero.
Specification
Change the @throws
clause in the method description as follows:
- * @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.
- csr of
-
JDK-8317265 ListFormat::format specification could be made clearer regarding handling IllegalArgumentException.
- Resolved