I thought the upshot of the discussion was that we are okay with this because the Model API (the only place from which we support getting ExtendedIterators) will never have a null retrieved value and we clearly warn in the method documentation that the retrieved value must not be null.
If the retrieved value is never null, the usage is congruent with things like Stream::findFirst. I agree that it will be difficult to remove, which is why I don't want to add a bunch of other nextOr* methods. ajs6f > On Dec 14, 2017, at 12:46 PM, Claude Warren <[email protected]> wrote: > > I was expecting that with the discovery that optional throws a null pointer > exception when the retrieved value is null would be enough to remove this > functionality. > > I am concerned that once added it will be difficult to remove and that its > operation is not congruent with stream based optional usage. > > Claude > > On 14 Dec 2017 10:33, "Andy Seaborne" <[email protected]> wrote: > >> Claude, >> >> The JIRA ticket ends: >> >> [[ >> ASF GitHub Bot added a comment - 04/Dec/17 15:36 >> >> That was already the case in the PR and I've added text to call it out >> explicitly into the javadoc. >> ---- >> githubbot ASF GitHub Bot added a comment - 04/Dec/17 15:40 >> >> Github user ajs6f commented on the issue: >> >> https://github.com/apache/jena/pull/323 >> >> Okay, that works for me! >> ---- >> Andy Seaborne added a comment - 04/Dec/17 15:58 >> >> nextOptional added for release 3.6.0. >> >> Proposal: close this JIRA for now, see how nextOptional works out and >> revisit orElse* based on experience. >> ---- >> ajs6f A. Soroka added a comment - 1 week ago >> >> +1 >> ]] >> >> Adding nextOptional, and no others, is in the RC. >> >> What were you expecting? >> >> Andy >> >> On 14/12/17 08:44, Claude Warren wrote: >> >>> Perhaps i wasn't paying close enough attention but i didn't think adding >>> optional and other streaming methods had been agreed. In fact i thought >>> quite the oposite. >>> >>> If i am wrong please forgive the noise. If i am correct shouldn't 1427 be >>> removed from the release candidate? >>> >>> Claude >>> >>>
