RFR : 8013712 : (XS) Add Objects.nonNull and Objects.isNull

Mike Duigou mike.duigou at oracle.com
Sat May 4 02:28:20 UTC 2013

I have updated the webrev to include incorporate the feedback I have received.


Regarding the naming of the "nonNull" method. I originally added this method in 2011 but I've forgotten since then why it has the name it does. As best as I can determine the name is either derived from the the name used by Guava for the same predicate, "notNull", or the names derives from the name "requireNonNull" in that this method doesn't require that the reference be non-null. The EG hasn't been concerned that this method doesn't use the "is" prefix.


On Apr 30 2013, at 15:45 , Mike Duigou wrote:

> Hello all;
> Another changeset coming from the lambda libraries effort. This one is two small additions to the Objects class. The introduced methods are not really intended to be used directly, comparison operators work better in imperative logic, but the methods will be very useful as Predicates.
> http://cr.openjdk.java.net/~mduigou/JDK-8013712/0/webrev/
> Thanks,
> Mike

More information about the core-libs-dev mailing list