Code review: 7012540 (java.util.Objects.nonNull() incorrectly named)

Bob Lee crazybob at
Thu Jan 27 01:20:14 UTC 2011

On Wed, Jan 26, 2011 at 3:44 PM, Joshua Bloch <jjb at> wrote:

> I like the name *nonNull*.  All other things being equal, shorter is
> better.  I've used the name *nonNull* for a few years, and it's feels
> right. To my mind, *requireNonNull* does a worse job of suggesting that
> the method returns its argument.

+1 for nonNull. While it's implemented as a method, I think of it more as a
keyword-like modifier, in which case an adjective works better than a verb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the core-libs-dev mailing list