Deprecating java.util.Date, java.util.Calendar and java.text.DateFormat and their subclasses

Filipp Gunbin fgunbin at fastmail.fm
Wed May 11 11:06:07 UTC 2022


On 07/05/2022 23:36 -0300, Victor Williams Stafusa da Silva wrote:

> On the positive impact side, more than just discouraging the usage of the
> ugly and annoying API of Date, Calendar and DateFormat for people who
> should know better, those classes are a frequent source of bugs that are
> hard do track and to debug due to their mutability and thread unsafety.

The old APIs are still useful when all you need is i) to have a
timestamp, ii) to convert it to calendrical information.  They are much
more compact than java.time.  If you know how to use them right (= read
the javadocs), then they're fine.  I don't mean that new programmers
should not use java.time, of course they should.  I'd just rather use
less strong words about the elder ones (the APIs :-)...


More information about the discuss mailing list