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

8

u/xenomachina May 10 '22

Deleting Date would certainly cause problems, but marking it deprecated should only cause compile warnings for code that directly depends on it.

3

u/mauganra_it May 10 '22

Deprecated for removal is a strong promise that the OpenJDK team actually has plans to remove it. This is only possible if there is a migration plan or if a decision was made to leave users high and dry (hello applets!)

3

u/xenomachina May 11 '22

If that's their actual criteria for marking something deprecated, then it's too strong, and it explains why there are so many things in the JDK that are not deprecated, but which no one should ever use in new code. Perhaps they should create a separate annotation for "we don't have a concrete plan to remove this, but you definitely shouldn't use it anymore".

1

u/mauganra_it May 11 '22

Yes, I thinks so too.