changeset 16938:7c72114a5558

8177653: clarify restrictions on Iterator.forEachRemaining Reviewed-by: martin
author smarks
date Fri, 31 Mar 2017 14:21:21 -0700
parents 184445e67dc7
children f2612af45b7a
files src/java.base/share/classes/java/util/Iterator.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/Iterator.java	Fri Mar 31 11:33:23 2017 -0700
+++ b/src/java.base/share/classes/java/util/Iterator.java	Fri Mar 31 14:21:21 2017 -0700
@@ -109,7 +109,8 @@
      * Exceptions thrown by the action are relayed to the caller.
      * <p>
      * The behavior of an iterator is unspecified if the action modifies the
-     * collection in any way (even by calling the {@link #remove remove} method),
+     * collection in any way (even by calling the {@link #remove remove} method
+     * or other mutator methods of {@code Iterator} subtypes),
      * unless an overriding class has specified a concurrent modification policy.
      * <p>
      * Subsequent behavior of an iterator is unspecified if the action throws an