RFR 9: 8138963 : java.lang.Objects new method to default to non-null

John Rose john.r.rose at oracle.com
Wed Oct 28 23:50:07 UTC 2015


On Oct 28, 2015, at 4:44 PM, John Rose <john.r.rose at oracle.com> wrote:
> 
> As I said to you verbally, I'm not going to "die on this hill", but I do think the name chosen has some disadvantages that could have been avoided with a very slight mental shift about require.  I.e., "requireNonNull*" requires its *return value* to be not-null, so if its *argument* is null, then an adjustment is made (throw, select alternate value, get-from-supplier).

P.S. Should have finished with this:

When adding new API points, let's be sensitive to regularity within families of methods that share a prefix, since IDEs present them together.




More information about the core-libs-dev mailing list