Threading issues
- 'AtomicFieldUpdater' field not declared 'static final'
Reports fields of types: java.util.concurrent.atomic.AtomicLongFieldUpdater java.util.concurrent.atomic.AtomicIntegerFieldUpdater java.util.concurrent.atomic.AtomicReferenceFieldUpdater that are not static final.
- 'ThreadLocal' field not declared 'static final'
Reports fields of type java.lang.ThreadLocal that are not declared static final.
- 'ThreadLocal.set()' with null as an argument
Reports java.lang.ThreadLocal.set() with null as an argument.
- 'ThreadLocalRandom' instance might be shared
Reports java.util.concurrent.ThreadLocalRandom instances which might be shared between threads.
- 'await()' not called in loop
Reports java.util.concurrent.locks.Condition.await() not being called inside a loop.
- 'await()' without corresponding 'signal()'
Reports calls to Condition.await(), for which no call to a corresponding Condition.signal() or Condition.signalAll() can be found.
- 'notify()' or 'notifyAll()' called on 'java.util.concurrent.locks.Condition' object
Reports calls to notify() or notifyAll() made on java.util.concurrent.locks.Condition object.
- 'notify()' or 'notifyAll()' without corresponding state change
Reports Object.notify() or Object.notifyAll() being called without any detectable state change occurring.
- 'notify()' without corresponding 'wait()'
Reports calls to Object.notify() or Object.notifyAll() for which no call to a corresponding Object.wait() can be found.
- 'signal()' without corresponding 'await()'
Reports calls to Condition.signal() or Condition.signalAll() for which no call to a corresponding Condition.await() can be found.
- 'synchronized' method
Reports the synchronized modifier on methods.
- 'wait()' called on 'java.util.concurrent.locks.Condition' object
Reports calls to wait() made on a java.util.concurrent.locks.Condition object.
- 'wait()' not called in loop
Reports calls to wait() that are not made inside a loop.
- 'wait()' or 'await()' without timeout
Reports calls to Object.wait() or Condition.await() without specifying a timeout.
- 'wait()' or 'notify()' is not in synchronized context
Reports calls to wait(), notify(), and notifyAll() that are not made inside a corresponding synchronized statement or synchronized method.
- 'wait()' while holding two locks
Reports calls to wait() methods that may occur while the current thread is holding two locks.
- 'wait()' without corresponding 'notify()'
Reports calls to Object.wait(), for which no call to the corresponding Object.notify() or Object.notifyAll() can be found.
- 'while' loop spins on field
Reports while loops that spin on the value of a non-volatile field, waiting for it to be changed by another thread.
- Access to 'static' field locked on instance data
Reports access to non-constant static fields that are locked on either this or an instance field of this.
- Busy wait
Reports calls to java.lang.Thread.sleep() that occur inside loops.
- Call to 'System.runFinalizersOnExit()'
Reports calls to System.runFinalizersOnExit().
- Call to 'Thread.setPriority()'
Reports calls to Thread.setPriority().
- Call to 'Thread.sleep()' while synchronized
Reports calls to java.lang.Thread.sleep() methods that occur within a synchronized block or method.
- Call to 'Thread.start()' during object construction
Reports calls to start() on java.lang.Thread or any of its subclasses during object construction.
- Call to 'Thread.stop()', 'suspend()' or 'resume()'
Reports calls to Thread.stop(), Thread.suspend(), and Thread.resume().
- Call to 'Thread.yield()'
Reports calls to Thread.yield().
- Call to 'notify()' instead of 'notifyAll()'
Reports calls to Object.notify().
- Call to 'signal()' instead of 'signalAll()'
Reports calls to java.util.concurrent.locks.Condition.signal().
- Call to a 'native' method while locked
Reports calls native methods within a synchronized block or method.
- Class directly extends 'Thread'
Reports classes that directly extend java.lang.Thread.
- Double-checked locking
Reports double-checked locking.
- Empty 'synchronized' statement
Reports synchronized statements with empty bodies.
- Field accessed in both 'synchronized' and unsynchronized contexts
Reports non-final fields that are accessed in both synchronized and non-synchronized contexts.
- Inconsistent 'AtomicFieldUpdater' declaration
Reports issues with AtomicLongFieldUpdater, AtomicIntegerFieldUpdater, or AtomicReferenceFieldUpdater fields (the java.util.concurrent.atomic package).
- Instantiating a 'Thread' with default 'run()' method
Reports instantiations of Thread or an inheritor without specifying a Runnable parameter or overriding the run() method.
- Lock acquired but not safely unlocked
Reports java.util.concurrent.locks.Lock resources that are not acquired in front of a try block or not unlocked in the corresponding finally block.
- Method with single 'synchronized' block can be replaced with 'synchronized' method
Reports methods whose body contains a single synchronized statement.
- Nested 'synchronized' statement
Reports nested synchronized statements.
- Non-atomic operation on 'volatile' field
Reports non-atomic operations on volatile fields.
- Non-private field accessed in 'synchronized' context
Reports non-final, non-private fields that are accessed in a synchronized context.
- Non-thread-safe 'static' field access
Reports access to static fields that are of a non-thread-safe type.
- Static initializer references subclass
Reports classes that refer to their subclasses in static initializers or static fields.
- Synchronization on 'getClass()'
Reports synchronization on a call to getClass().
- Synchronization on 'static' field
Reports synchronization on static fields.
- Synchronization on 'this'
Reports synchronization on this or class expressions.
- Synchronization on a 'Lock' object
Reports synchronized blocks that lock on an instance of java.util.concurrent.locks.Lock.
- Synchronization on a non-final field
Reports synchronized statement lock expressions that consist of a non-final field reference.
- Synchronization on an object initialized with a literal
Reports synchronized blocks that lock on an object initialized with a literal.
- Synchronization on local variable or method parameter
Reports synchronization on a local variable or parameter.
- Unconditional 'wait()' call
Reports wait() being called unconditionally within a synchronized context.
- Unsynchronized method overrides 'synchronized' method
Reports non-synchronized methods overriding synchronized methods.
- Volatile array field
Reports array fields that are declared volatile.