Inspectopedia Help

'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.

This is probably a programming error, and some variant of the signal() or signalAll() method was intended instead, otherwise IllegalMonitorStateException may occur.

Example:

class C { final Lock l = new ReentrantLock(); final Condition c = l.newCondition(); void release() { l.lock(); try { c.notifyAll(); // probably 'signalAll()' was intended here } finally { l.unlock(); } } }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023