Doug Lea dl at
Sun Sep 23 07:11:43 PDT 2012

Oh, to clarify...

On 09/23/12 09:58, Doug Lea wrote:
> On 09/23/12 09:54, Tim Peierls wrote:
>>     For findAny etc, the issue is even harder:
>>        if (!...findAny(...).isPresent())
>>          // somehow recheck?
>>     And the need for recheck is even less obvious.
>> So unobvious that I still don't see it. As long as you aren't treating null as
>> an acceptable value in Streams or as the contents of an Optional, why do you
>> need to re-check?

But in Brian's proposal, null IS acceptable.

> Suppose there are two elements that match predicate, one null, one
> nonnull. And suppose the findAny implementation finds the null one
> first and so reports an absent Optional.
> -Doug

More information about the lambda-libs-spec-observers mailing list