# HG changeset patch # User psandoz # Date 1422291960 0 # Node ID 49cdfa0ea390cb0dbc33bb4f5a0785f182893afb # Parent fe8344cf6496a404e69769ddbda8af72e1550c4b 8032513: The Spliterator characteristics CONCURRENT and IMMUTABLE are mutually exclusive Reviewed-by: chegar, lancea, dfuchs diff -r fe8344cf6496 -r 49cdfa0ea390 jdk/src/java.base/share/classes/java/util/Spliterator.java --- a/jdk/src/java.base/share/classes/java/util/Spliterator.java Mon Jan 26 10:55:27 2015 -0500 +++ b/jdk/src/java.base/share/classes/java/util/Spliterator.java Mon Jan 26 17:06:00 2015 +0000 @@ -553,6 +553,12 @@ * sub-split size is known and additions or removals to the source are not * reflected when traversing. * + *

A top-level Spliterator should not report both {@code CONCURRENT} and + * {@code IMMUTABLE}, since they are mutually exclusive. Such a Spliterator + * is inconsistent and no guarantees can be made about any computation using + * that Spliterator. Sub-spliterators may report {@code IMMUTABLE} if + * additions or removals to the source are not reflected when traversing. + * * @apiNote Most concurrent collections maintain a consistency policy * guaranteeing accuracy with respect to elements present at the point of * Spliterator construction, but possibly not reflecting subsequent