# HG changeset patch # User smarks # Date 1490995281 25200 # Node ID 8b5586e43dd1d6d62b7660c5ae344e95d6211a56 # Parent cc806ac78e7bb359ff8f5ea5e684769eba69e944 8177653: clarify restrictions on Iterator.forEachRemaining Reviewed-by: martin diff -r cc806ac78e7b -r 8b5586e43dd1 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. *

* 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. *

* Subsequent behavior of an iterator is unspecified if the action throws an