O'Reilly logo

The CERT® Oracle® Secure Coding Standard for Java™ by David Svoboda, Dean F. Sutherland, Robert C. Seacord, Dhruv Mohindra, Fred Long

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Thread APIs (THI)

Rules

Image

Risk Assessment Summary

Image

THI00-J. Do not invoke Thread.run()

Thread startup can be misleading because the code can appear to be performing its function correctly when it is actually being executed by the wrong thread. Invoking the Thread.start() method instructs the Java runtime to start executing the thread’s run() method using the started thread. Invoking a Thread object’s run() method directly is incorrect. When a Thread object’s run() method is invoked directly, the statements in the run() method are executed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required