Optional.or name Re: RFR 8080418 Add Optional.or() (original) (raw)

Paul Sandoz paul.sandoz at oracle.com
Wed Oct 14 08:54:09 UTC 2015


On 13 Oct 2015, at 22:43, Stephen Colebourne <scolebourne at joda.org> wrote:

I'd prefer to see "this" mentioned: "If a value is not present, invoke the specified supplier to provide the result, otherwise return {@code this}" While I understand the original form gave some spec wiggle room, it also made the method far more mysterious.

That wiggle room is useful to avoid baking in any assumptions about the identity of the returned Optional.

Paul.



More information about the core-libs-dev mailing list