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

Stuart Marks stuart.marks at oracle.com
Tue Oct 6 21:03:57 UTC 2015


On 10/6/15 10:09 AM, Louis Wasserman wrote:
> On Tue, Oct 6, 2015 at 10:03 AM Stuart Marks <stuart.marks at oracle.com 
> <mailto:stuart.marks at oracle.com>> wrote:
>> As an aside I notice that Guava's Objects.firstNonNull() is deprecated, with a
>> recommended replacement of MoreObjects.firstNonNull(). [1] The semantics are the
>> same, though, as far as I can see. I'm curious as to what's going here, though.
> Guava is moving from Objects to MoreObjects because the JDK added an Objects 
> class, and Guava wanted to avoid naming conflicts with the JDK.
Thanks for the quick response, Louis. We'll make sure not to add a MoreObjects 
class to the JDK. :-)

s'marks




More information about the core-libs-dev mailing list