Wiki Markup |
---|
Never use deprecated fields, methods, or classes in new code. The Java SE 6 documentation provides a [complete list|http://download.oracle.com/javase/6/docs/api/deprecated-list.html] of deprecated APIs \[[API 2006|AA. Bibliography#API 06]\]. Java provides a {{@deprecated}} annotation to indicate the deprecation of specific fields, methods, and classes. For instance, many methods of {{java.util.Date}}, such as {{Date.getYear()}}, have been explicitly deprecated. The rule [THI05-J. Do not use Thread.stop() to terminate threads|THI05-J. Do not use Thread.stop() to terminate threads] describes issues that can result from using the deprecated {{Thread.stop()}} method. |
...
The following methods and classes must not be used 1:
Class or Method | Replacement | Rule |
---|---|---|
| |
|
| |
|
| |
|
| | ERR06-J. Do not let code throw undeclared checked exceptions |
| |
|
| |
|
| inherently unsafe | |
| inherently unsafe | |
| |
|
| inherently unsafe | LCK07-J. Avoid deadlock by requesting and releasing locks in the same order |
| | |
| inherently unsafe |
1. The external features JVM Profiler Interface (JVMPI) and JVM Debug Interface (JVMDI)
...
are 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
Risk Assessment
Using deprecated or obsolete classes or methods in program code can lead to erroneous behavior.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1bd57475019bae17-6d6c1067-452a4a72-83ee92f6-03f85d055c39a1e60917638c"><ac:plain-text-body><![CDATA[ | [ISO/IEC TR 24772:2010 | http://www.aitcnet.org/isai/] | "Deprecated Language Features [MEM]" | ]]></ac:plain-text-body></ac:structured-macro> |
CWE ID 589, "Call to Non-ubiquitous API" |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="280c5f198363a4e2-a65ffe81-492c4364-bb9d89a8-e1543520ced2302f6a6559a4"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API 06]] | [Deprecated API | http://java.sun.com/javase/6/docs/api/deprecated-list.html], [Dictionary | http://download.oracle.com/javase/6/docs/api/java/util/Dictionary.html] | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6eaf735292825e5e-17b4ab18-478a4828-98bd9391-35da1588d4eaa0f02d3c95ce"><ac:plain-text-body><![CDATA[ | [[SDN 2008 | AA. Bibliography#SDN 08]] | Bug database, [Bug ID 4264153 | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4264153] | ]]></ac:plain-text-body></ac:structured-macro> |
...