| 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#APIReferences#API 06]\]. Java also 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. Rule [THI05-J. Do not use Thread.stop() to terminate threads] describes issues that can result from using the deprecated {{Thread.stop()}} method. |
| Wiki Markup |
|---|
Obsolete fields, methods, and classes should not be used. Java lacks any annotation that indicates obsolescence; nevertheless, several classes and methods are documented as obsolete. For instance, the {{java.util.Dictionary}} class is marked as obsolete; new code should use {{java.util.Map<K,V>}} instead \[[API 2006|AA. Bibliography#APIReferences#API 06]\]. |
Obsolete Methods and Classes
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f5b8848ef44b623d-f96fdbb7-45a947e7-8d798180-68ec86dd4b4e994128b17962"><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-589. Call to non-ubiquitous API |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="84d70c58e0d0d029-6097d987-411f48b5-a036bdd3-76a558da76754622b0f29ada"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API References#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="a4273e1a4a138e67-73914de2-43914a96-a3f486a4-020fb45fbd0194b4a65e44bb"><ac:plain-text-body><![CDATA[ | [[SDN 2008 | AA. Bibliography#SDN References#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> |
...