Jtest logo




Contents  Previous  Next  Index

TRS.THRD


Do not call 'Thread.resume()', 'Thread.stop()', or 'Thread.suspend()'

Description

This rule flags code that calls 'Thread.resume()', 'Thread.stop()', or 'Thread.suspend()'.

'Thread.resume()', 'Thread.stop()', or 'Thread.suspend()' have been deprecated because they are deadlock-prone.

Example

 package TRS;
 public class ThreadStop extends Thread {
     public void method() {
         stop();                      // violation.
     }
 }

Repair

See the reference.

Reference

See "java.lang.Thread" of API documentation.


Contents  Previous  Next  Index

ParaSoft logo
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft