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="bb755ef1caffff00-b495b356-4b1a4cb2-b4af9268-11757398c39a99791bce0aff"><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="bc2095f4f74cb96f-58978fe0-4e2440d3-ad8f820e-2a577c0822b785a5963db6b9"><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="0ebf9cad4efbb1d1-6630e0b5-4a3c48d4-9f81baa1-94182ff78e969d52da1ef5c1"><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> |
...