Nulls

Tim Peierls tim at peierls.net
Mon Sep 24 17:01:32 PDT 2012


As far as I'm concerned it can say that behavior is undefined if the
collection contains null.

No coddling.

On Mon, Sep 24, 2012 at 7:21 PM, Doug Lea <dl at cs.oswego.edu> wrote:

> On 09/24/12 12:08, Brian Goetz wrote:
>
>> I think we're trying to not encourage further abuse.  There's consensus
>> that
>> present Optional should NOT store null.  Similarly, the Joe/Tim/Brian
>> cabal is
>> trying to NOT burden the streams API/implementation with any special
>> null-awareness, again for the sake of not coddling abuse.
>>
>>
> I'm still a little bit in disbelief about the proposal.
> The spec for findAny would look like:
>
>  * @return ... an absent Optional if no element matches
>  * the given predicate, or if the predicate reports true for
>  * a null argument and the stream contains a null element,
>  * possibly even if the predicate also holds for another
>  * nonnull element
>
> OK?
>
> -Doug
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20120924/b8631b6c/attachment.html 


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