Class |
Description |
BusyWaitRule
|
Busy waiting (forcing a Thread.sleep() while waiting on a condition) should be avoided. |
DoubleCheckedLockingRule
|
This rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block. |
InconsistentPropertyLockingRule
|
Class contains similarly-named get and set methods where one method of the pair is marked either- WithReadLock:
- or
- WithWriteLock:
- and the other is not locked at all.
|
InconsistentPropertySynchronizationRule
|
Class contains similarly-named get and set methods where the set method is synchronized and the get method is not, or the get method is synchronized and the set method is not. |
NestedSynchronizationRule
|
Rule to detect nested synchronization blocks. |
StaticCalendarFieldRule
|
Calendar objects should not be used as static fields. |
StaticConnectionRule
|
Creates violations when a java.sql.Connection object is used as a static field. |
StaticDateFormatFieldRule
|
DateFormat objects should not be used as static fields. |
StaticMatcherFieldRule
|
Matcher objects should not be used as static fields. |
StaticSimpleDateFormatFieldRule
|
SimpleDateFormat objects should not be used as static fields. |
SynchronizedMethodRule
|
Synchronized Method Rule - This rule reports uses of the synchronized keyword on
methods. |
SynchronizedOnBoxedPrimitiveRule
|
The code synchronizes on a boxed primitive constant, such as an Integer. |
SynchronizedOnGetClassRule
|
Synchronized on getClass rather than class literal. |
SynchronizedOnReentrantLockRule
|
Synchronizing on a ReentrantLock field is almost never the intended usage. |
SynchronizedOnStringRule
|
Synchronization on a String field can lead to deadlock because Strings are interned by the JVM and can be shared. |
SynchronizedOnThisRule
|
Synchronized On This Rule - This rule reports uses of the synchronized blocks where
the synchronization reference is 'this'. |
SynchronizedReadObjectMethodRule
|
Catches Serializable classes that define a synchronized readObject method. |
SystemRunFinalizersOnExitRule
|
Method calls to System.runFinalizersOnExit() should not be allowed. |
ThisReferenceEscapesConstructorRule
|
Reports constructors passing the 'this' reference to other methods.
|
ThreadGroupRule
|
Avoid using ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe. |
ThreadLocalNotStaticFinalRule
|
ThreadLocal fields should be static and final. |
ThreadYieldRule
|
Method calls to Thread.yield() should not be allowed.
|
UseOfNotifyMethodRule
|
This code calls notify() rather than notifyAll(). |
VolatileArrayFieldRule
|
Volatile array fields are unsafe because the contents of the array are not treated as volatile. |
VolatileLongOrDoubleFieldRule
|
This rule reports long or double fields which are declared as volatile. |
WaitOutsideOfWhileLoopRule
|
Checks for calls to wait() that are not within a while loop. |