org.codenarc.rule.concurrency
[Groovy] Class VolatileLongOrDoubleFieldRule
java.lang.Object
org.codenarc.rule.AbstractRule
org.codenarc.rule.AbstractAstVisitorRule
org.codenarc.rule.concurrency.VolatileLongOrDoubleFieldRule
class VolatileLongOrDoubleFieldRule
extends AbstractAstVisitorRule
This rule reports long or double fields which are declared as volatile. Java
specifies that reads and writes from such fields are atomic, but many JVM's
have violated this specification. Unless you are certain of your JVM, it is
better to synchronize access to such fields rather than declare them volatile.
- 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