org.codenarc.rule.concurrency
[Groovy] Class ThreadLocalNotStaticFinalRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.AbstractAstVisitorRule
org.codenarc.rule.concurrency.ThreadLocalNotStaticFinalRule
class ThreadLocalNotStaticFinalRule
extends AbstractAstVisitorRule
ThreadLocal fields should be static and final. In the most common case a java.lang.ThreadLocal
instance associates state with a thread. A non-static non-final java.lang.ThreadLocal field
associates state with an instance-thread combination. This is seldom necessary and often a
bug which can cause memory leaks and possibly incorrect behavior.
- Authors:
- Hamlet D'Arcy
- Version:
- \$Revision: 609 \$ - \$Date: 2011-02-24 13:48:43 -0500 (Thu, 24 Feb 2011) \$
Methods inherited from class AbstractRule
|
applyTo, applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, isReady, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport, toString, validate |
astVisitorClass
Class astVisitorClass
-
name
String name
-
priority
int priority
-
Groovy Documentation