# Package groovy.org.codenarc.rule.concurrency

- Class Summary
  Class | Description
  --- | ---
  BusyWaitAstVisitor |
  BusyWaitRule | Busy waiting (forcing a Thread.sleep() while waiting on a condition) should be avoided.
  DoubleCheckedLockingAstVisitor |
  DoubleCheckedLockingRule | This rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block.
  InconsistentPropertyLockingAstVisitor |

  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.

  InconsistentPropertySynchronizationAstVisitor |
  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.
  NestedSynchronizationAstVisitor |
  NestedSynchronizationRule | Rule to detect nested synchronization blocks.
  StaticCalendarFieldAstVisitor |
  StaticCalendarFieldRule | Calendar objects should not be used as static fields.
  StaticConnectionAstVisitor |
  StaticConnectionRule | Creates violations when a java.sql.Connection object is used as a static field.
  StaticDateFormatFieldAstVisitor |
  StaticDateFormatFieldRule | DateFormat objects should not be used as static fields.
  StaticMatcherFieldAstVisitor |
  StaticMatcherFieldRule | Matcher objects should not be used as static fields.
  StaticSimpleDateFormatFieldAstVisitor |
  StaticSimpleDateFormatFieldRule | SimpleDateFormat objects should not be used as static fields.
  SynchronizedMethodAstVisitor |
  SynchronizedMethodRule | Synchronized Method Rule - This rule reports uses of the synchronized keyword on methods.
  SynchronizedOnBoxedPrimitiveAstVisitor |
  SynchronizedOnBoxedPrimitiveRule | The code synchronizes on a boxed primitive constant, such as an Integer.
  SynchronizedOnGetClassAstVisitor |
  SynchronizedOnGetClassRule | Synchronized on getClass rather than class literal.
  SynchronizedOnReentrantLockAstVisitor |
  SynchronizedOnReentrantLockRule | Synchronizing on a ReentrantLock field is almost never the intended usage.
  SynchronizedOnStringAstVisitor |
  SynchronizedOnStringRule | Synchronization on a String field can lead to deadlock because Strings are interned by the JVM and can be shared.
  SynchronizedOnThisAstVisitor |
  SynchronizedOnThisRule | Synchronized On This Rule - This rule reports uses of the synchronized blocks where the synchronization reference is 'this'.
  SynchronizedReadObjectMethodAstVisitor |
  SynchronizedReadObjectMethodRule | Catches Serializable classes that define a synchronized readObject method.
  SystemRunFinalizersOnExitAstVisitor |
  SystemRunFinalizersOnExitRule | Method calls to System.runFinalizersOnExit() should not be allowed.
  ThisReferenceEscapesConstructorAstVisitor |
  ThisReferenceEscapesConstructorRule | Reports constructors passing the 'this' reference to other methods.
  ThreadGroupAstVisitor |
  ThreadGroupRule | Avoid using ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe.
  ThreadLocalNotStaticFinalAstVisitor |
  ThreadLocalNotStaticFinalRule | ThreadLocal fields should be static and final.
  ThreadYieldAstVisitor |
  ThreadYieldRule | Method calls to Thread.yield() should not be allowed.
  UseOfNotifyMethodAstVisitor |
  UseOfNotifyMethodRule | This code calls notify() rather than notifyAll().
  VolatileArrayFieldAstVisitor |
  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.
  VolatileLongOrDoubleFieldVisitor |
  WaitOutsideOfWhileLoopAstVisitor |
  WaitOutsideOfWhileLoopRule | Checks for calls to wait() that are not within a while loop.