mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
28 lines
717 B
HTML
28 lines
717 B
HTML
<html>
|
|
<body>
|
|
Reports calls to <code>notify()</code> or <code>notifyAll()</code> made on
|
|
<code>java.util.concurrent.locks.Condition</code> object.
|
|
<p>
|
|
This is probably a programming error, and some variant of the <code>signal()</code> or
|
|
<code>signalAll()</code> method was intended instead, otherwise <code>IllegalMonitorStateException</code> may occur.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
|
|
</body>
|
|
</html> |