RFR 8024408: Specifications for Collection/List/Set/SortedSet.spliterator() need to document if all the (subclass) instances are required to return SIZED spliterators
paul.sandoz at oracle.com
Sun Sep 15 16:20:53 UTC 2013
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.
More information about the core-libs-dev