Versions Compared

Key

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

...

Finally, several classes and methods impose particular limitations on their use. For instance, all of the subclasses of the abstract class java.text.Format are thread-unsafe. These classes must be avoided in multi-threaded code. For more information about thread-safety, see guideline TSM04-J. Document thread-safety and use annotations where applicable.

Obsolete Methods and Classes

The following methods and classes must not be used in new code:

Class or Method

Replacement

Guideline

{[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.Thread.stop()

 

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

java.util.Date, (many methods)

java.util.Calendar

 

java.util.Dictionary

{{java.util.Map<K,V>

 

java.util.Properties.save()

java.util.Properties.store()

 

Risk Assessment

Using deprecated or obsolete classes or methods in program code can lead to erroneous behavior.

...