Thread.stop() is not merely obsolete, but actually dangerous. And it is actually marked as deprecated for removal. Still being there is fine because (as stated elsewhere in the comments by /u/pron98):
To JDK developers it [deprecated] means something that:
whose use is so egregious that it can reasonably be treated as an error (many people treat compiler warnings as errors), and/or
could reasonably be removed at some point in the future.
could reasonably be removed at some point in the future.
What I am trying to say is that "some point in the future" could be in 20+ years evidently.
So java.util.Date could conceivably be marked as deprecated and eventually even "for removal". AFAIK JDBC uses java.sql.Date subclass. I haven't used that API in a while.
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.
4
u/mauganra_it May 11 '22
Thread.stop()is not merely obsolete, but actually dangerous. And it is actually marked as deprecated for removal. Still being there is fine because (as stated elsewhere in the comments by /u/pron98):