Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following methods and classes must not be used 1:

Class or Method

Replacement

Rule

java.lang.Character.isJavaLetter()

java.lang.Character.isJavaIdentifierStart()

 

java.lang.Character.isJavaLetterOrDigit()

java.lang.Character.isJavaIdentifierPart()

 

java.lang.Character.isSpace()

java.lang.Character.isWhitespace()

 

java.lang.reflect.Class.newInstance()

java.lang.reflect.Constructor.newInstance()

ERR06-J. Do not let code throw undeclared checked exceptions

java.util.Date (many methods)

java.util.Calendar

 

java.util.Dictionary

java.util.Map<K,V>

 

java.util.Properties.save()

java.util.Properties.store()

 

java.lang.Thread.stop()

java.lang.Thread.interrupt()

THI05-J. Do not use Thread.stop() to terminate threads

java.lang.ThreadGroup (many methods)

inherently unsafe

THI01-J. Do not invoke ThreadGroup methods

1. The external features JVM 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.

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="6f42312694605c52-ae778854-4e2a4343-80ebb7cd-16d2bc76557ea8193d9ff223"><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>

MITRE CWE

CWE ID 589, "Call to Non-ubiquitous API"

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="53f1c2efda953ee8-cba1aca3-42a84cd2-85d1951c-027122958388e54fb0ef96e6"><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="761b4b0d36187290-6ba612b1-48da4bc4-b027b6fa-bd21a568991a44519a00bd76"><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>

...