Looks OK assuming the CCC is approved

On Jan 20, 2015, at 11:27 AM, Paul Sandoz <paul.san...@oracle.com> wrote:

> Hi
> 
> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8032513-Spliterator-immutable-concurrent/webrev/
> 
> This is really just a clarification making what was implicitly obvious 
> explicitly so.
> 
> I will file a CCC.
> 
> Paul.
> 
> diff -r ff20291021b3 src/java.base/share/classes/java/util/Spliterator.java
> --- a/src/java.base/share/classes/java/util/Spliterator.java    Tue Jan 20 
> 16:19:16 2015 +0000
> +++ b/src/java.base/share/classes/java/util/Spliterator.java    Tue Jan 20 
> 16:23:23 2015 +0000
> @@ -553,6 +553,12 @@
>      * sub-split size is known and additions or removals to the source are not
>      * reflected when traversing.
>      *
> +     * <p>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
> 



Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
lance.ander...@oracle.com



Reply via email to