8177653: clarify restrictions on Iterator.forEachRemaining
authorsmarks
Fri, 31 Mar 2017 14:21:21 -0700
changeset 44431 8b5586e43dd1
parent 44430 cc806ac78e7b
child 44432 612026727d7d
8177653: clarify restrictions on Iterator.forEachRemaining Reviewed-by: martin
jdk/src/java.base/share/classes/java/util/Iterator.java
--- a/jdk/src/java.base/share/classes/java/util/Iterator.java	Fri Mar 31 11:33:23 2017 -0700
+++ b/jdk/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