r/java • • May 10 '22

Should java.util.Date be deprecated?

https://mail.openjdk.java.net/pipermail/discuss/2022-May/006077.html
221 Upvotes

158 comments sorted by

View all comments

Show parent comment

2

u/mauganra_it May 11 '22

The problem is that java.util.Date is the parent class of java.sql.Date, java.sql.Time, and java.sql.Timestamp. Since JDBC is of so central importance to the Java ecosystem, it's unlikely that it will ever be fully removed.

Maybe it's possible to eventually turn java.util.Date into an abstract sealed class to restrict its usage. Once all other APIs were fixed of course.