What methods should go into a java.util.Objects class in JDK 7?
jason_mehrens at hotmail.com
Wed Oct 7 16:17:20 UTC 2009
> Hi Stephen,
> > In key places there are multiple options. NIO Path vs File and
> > Calendar vs Date are examples.
> As you know, Path (resp. Calendar) is just an attempt to correct the
> mess introduced by File (resp. Date).
> So yes, there is duplication but this duplication is done to correct a
> wrong design.
> > (Most code is written using IDEs these days, so having a predictable
> > place to start from for autocomplete is important. Hence having
> > equals/hashCode/compare but not toString would be very unintuitive to
> > the Objects API).
> > Stephen
The 2 toString variants from ObjectUtils are very handy to have for displaying values for UIs. Perhaps those should be added to Objects to correct a wrong design (limited use) of returning "null" for null and would least provide new behavior.
Seems like the way to go unless these are going to cause more harm (confusion) than good.
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the core-libs-dev