RFR: 8023339 & 8023340 : (xs) Refine throws UOE/NPE Conditions
Paul Sandoz
paul.sandoz at oracle.com
Fri Sep 20 19:11:44 UTC 2013
Hi Mike,
You made changes to the documentation of List.replaceAll which does not perform matching:
398 * @param operator the operator to apply to each element
399 * @throws UnsupportedOperationException if this list is unmodifiable.
400 * Implementations may throw this exception if a matching element
401 * cannot be replaced or if, in general, modification is not
402 * supported
403 * @throws NullPointerException if the specified operator is null or
404 * if the operator result is a null value and this list does
405 * not permit null elements
406 * (<a href="Collection.html#optional-restrictions">optional</a>)
407 * @since 1.8
408 */
409 default void replaceAll(UnaryOperator<E> operator) {
* @throws UnsupportedOperationException if this list is unmodifiable.
* Implementations may throw this exception if an element
* cannot be replaced or if, in general, modification is not
* supported
?
Paul.
On Sep 17, 2013, at 3:35 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
> Hello all;
>
> Another, hopefully final, attempt at refining the @throws UOE javadoc for Collections.removeIf and the @throws UOE and NPE javadoc for List.replaceAll().
>
> This cycle adopts the verbiage suggested by Paul Sandoz in the last round of 8023339.
>
> Both changesets are combined into a single webrev:
>
> http://cr.openjdk.java.net/~mduigou/JDK-8023340/1/webrev/
>
> Thanks,
>
> Mike
More information about the core-libs-dev
mailing list