Compatible with IntelliJ IDEA
Apr 29, 2009
1 759
CheckThread provides a thread annotation library and a static analysis engine for finding certain kinds of threading bugs at compile time. CheckThread will report thread confinement violations and race conditions within the Intellij IDE.

  • Install the Intellij Plugin, restart Intellij.
  • Import the checkthread-annotation.jar file into your Java project. You can get this jar from or inside the unpacked plugin.
  • Add @ThreadSafe, @NotThreadSafe, and @ThreadConfined thread policy Java annotations to your Java code.
  • Alternatively, instead of using Java annotations, you can specify a method's thread policy by adding a threadpolicy.xml file to your Intellij project's class path. See for a simple example.
  • Compile your Java code and press the CheckThread toolbar button to perform analysis.
  • CheckThread inspects Java byte code, so be sure to compile your latest changes before pressing the CheckThread button.

  • ThreadSafe - Add this annotation to methods that are thread safe. CheckThread will validate that there are no race conditions.
  • NotThreadSafe - Add this annotation to methods that are not thread safe.
  • ThreadConfined- Add this annotation to methods that are thread confined. For example, methods on Swing components are confined to the event-dispatch thread. CheckThread will report if you are calling a Swing method on the wrong thread.


Download plugin

General usage instructions

See for instructions.

***Change History***

Adding support for Intellij 8

Version: 1.0.9
Adding support for threadpolicy.xml