RFR 8169808 Stream returning methods should specify if they are late binding

Paul Sandoz paul.sandoz at oracle.com
Wed Nov 23 18:07:19 UTC 2016


> On 23 Nov 2016, at 07:50, Doug Lea <dl at cs.oswego.edu> wrote:
> 
> On 11/23/2016 10:05 AM, Martin Buchholz wrote:
>> Right now, PBQ's spliterator is in violation of
>> 
>> """A Spliterator that does not report IMMUTABLE or CONCURRENT is
>> expected to have a documented policy concerning: when the spliterator
>> binds to the element source;"""
>> 
>> so I think we only get a choice between IMMUTABLE and CONCURRENT.  I
>> propose:
> 
> Well, OK. Hopefully no user program will hardwire which
> choice is made, in case the implementation changes.
> 

I think we boxed ourselves into the corner when we specified that the PBQ.spliterator reports SIZED. Although the spliterator is specified to be weakly consistent, it cannot reflect any modifications subsequent to first size query, traversal or split.

Paul.


More information about the core-libs-dev mailing list