Java
'notify()' or 'notifyAll()' called on 'java.util.concurrent.locks.Condition' object
Warning
New
Last modified: 03 December 2024 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();
}
}
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
NotifyCalledOnCondition
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?