class DoubleCheckedLockingRule extends AbstractAstVisitorRule
This rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block. Double checked locking does not guarantee correctness and is an anti-pattern.
Fields inherited from class | Fields |
---|---|
class AbstractAstVisitorRule |
CLOSURE_TEXT, DEFAULT_CONST_NAME, DEFAULT_FIELD_NAME, DEFAULT_TEST_CLASS_NAMES, DEFAULT_TEST_FILES, DEFAULT_VAR_NAME |
Type | Name and description |
---|---|
java.lang.Class |
astVisitorClass |
java.lang.String |
name |
int |
priority |
Constructor and description |
---|
DoubleCheckedLockingRule
() |
Groovy Documentation