RFR(s): 8140281 add no-arg Optional.orElseThrow() as preferred alternative to get()

Stephen Colebourne scolebourne at joda.org
Sat Dec 9 09:20:29 UTC 2017

On 8 December 2017 at 00:33, Stuart Marks <stuart.marks at oracle.com> wrote:
> Please review this changeset that introduces a new no-arg method
> orElseThrow() to Optional, as a preferred alternative to the get() method.

I am willing to accept this addition as it has an obvious parallel to
the existing supplier method.

My position on removing get() has not changed however, and as such I
am displeased with the addition of the "preferred alternative" text.


More information about the core-libs-dev mailing list