From 8e3c3cf9efe2ef87d678e622e57a205a76de7ff8 Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Fri, 31 Mar 2017 14:21:21 -0700 Subject: [PATCH] 8177653: clarify restrictions on Iterator.forEachRemaining Reviewed-by: martin --- jdk/src/java.base/share/classes/java/util/Iterator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.base/share/classes/java/util/Iterator.java b/jdk/src/java.base/share/classes/java/util/Iterator.java index 7dcb155c63d..a5d89293a2c 100644 --- a/jdk/src/java.base/share/classes/java/util/Iterator.java +++ b/jdk/src/java.base/share/classes/java/util/Iterator.java @@ -109,7 +109,8 @@ public interface Iterator { * 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