Groovy Documentation

org.codenarc.rule.concurrency
Class SynchronizedOnThisRule

java.lang.Object
  org.codenarc.rule.AbstractRule
      org.codenarc.rule.AbstractAstVisitorRule
          org.codenarc.rule.concurrency.SynchronizedOnThisRule

class SynchronizedOnThisRule
extends AbstractAstVisitorRule

Synchronized On This Rule - This rule reports uses of the synchronized blocks where the synchronization reference is 'this'. Doing this effectively makes your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects.

author:
Hamlet D'Arcy
version:
$Revision: 329 $ - $Date: 2010-04-28 22:20:25 -0400 (Wed, 28 Apr 2010) $


Property Summary
Class astVisitorClass

String name

int priority

 
Constructor Summary
SynchronizedOnThisRule()

 
Method Summary
 
Methods inherited from class AbstractAstVisitorRule
shouldApplyThisRuleTo
 
Methods inherited from class AbstractRule
applyTo, createViolation, createViolation, createViolationForImport, createViolationForImport, getImportsSortedByLineNumber, getName, getPriority, packageNameForImport, setName, setPriority, sourceLineAndNumberForImport, sourceLineAndNumberForImport
 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 
Constructor Detail

SynchronizedOnThisRule

SynchronizedOnThisRule()


 

Groovy Documentation