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.
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
>> 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
More information about the lambda-libs-spec-observers