RFR 8024408: Specifications for Collection/List/Set/SortedSet.spliterator() need to document if all the (subclass) instances are required to return SIZED spliterators
Alan.Bateman at oracle.com
Sun Sep 22 16:31:00 UTC 2013
On 15/09/2013 09:20, Paul Sandoz wrote:
> It is necessary to relax the constraints when SIZED should be reported for a Spliterator of a Collection or Set.
> The spliterator of a Collection/Set can report SIZED, or CONCURRENT, or neither (and never both). The latter case can occur with the strange beast known as WeakHashMap, which is not CONCURRENT in the commonly understood sense, but it's traversal is weakly consistent and the size is only an estimate.
> Note that no change was made to List, which basically means no List implementation can be concurrent. This interface is not well suited for concurrent implementations given the determinism expected for indexed access e.g. l.get(l.size() - 1) could barf for a concurrent or weak list if something is concurrently removed.
> A CCC is required.
I looked through one and it looks okay to me.
More information about the core-libs-dev