Never use deprecated fields, methods, or classes in new code. Java also provides an @deprecated
annotation to indicate the deprecation of specific fields, methods, and classes. For example, many methods of java.util.Date
, such as Date.getYear()
, have been explicitly deprecated. THI05-J. Do not use Thread.stop() to terminate threads describes issues that can result from using the deprecated Thread.stop()
method.
...
Obsolete Methods and Classes
The following methods and classes listed in the following table must not be used:
Class or Method | Replacement | Rule |
---|---|---|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
| |
|
| |
|
|
The Java Virtual Machine Profiler Interface (JVMPI) and JVM Debug Interface (JVMDI) are also deprecated and have been replaced by the JVM Tool Interface (JVMTI) (see rule ENV05-J. Do not deploy an application that can be remotely monitored for more information).
...