OpenJDK / portola / portola
changeset 20477:f7a1f6688508
8023340: Clarify that unmodifiable List.replaceAll() may not throw UOE if there are no items to be replaced.
Reviewed-by: psandoz, jjg
author | mduigou |
---|---|
date | Fri, 27 Sep 2013 13:30:35 -0700 |
parents | 2d01671506ba |
children | 56135e8cbc46 |
files | jdk/src/share/classes/java/util/List.java |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/share/classes/java/util/List.java Fri Sep 27 13:30:31 2013 -0700 +++ b/jdk/src/share/classes/java/util/List.java Fri Sep 27 13:30:35 2013 -0700 @@ -396,11 +396,13 @@ * replacing the first element. * * @param operator the operator to apply to each element - * @throws UnsupportedOperationException if the {@code set} - * operation is not supported by this list + * @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 * @throws NullPointerException if the specified operator is null or - * if the element is replaced with a null value and this list - * does not permit null elements + * if the operator result is a null value and this list does + * not permit null elements * (<a href="Collection.html#optional-restrictions">optional</a>) * @since 1.8 */ @@ -685,4 +687,3 @@ return Spliterators.spliterator(this, Spliterator.ORDERED); } } -