blob: 3830561ec368795f4eb2ba776511cf9867d18938 [file] [log] [blame]
package com.siyeh.igtest.threading;
public class UnconditionalWaitInspection
{
public void foo() throws InterruptedException {
final Object bar = new Object();
synchronized (this) {
bar.toString();
bar.wait();
}
synchronized (this) {
if(foobar())
{
}
bar.wait();
}
synchronized (this) {
wait();
}
}
private boolean foobar() {
return false;
}
public synchronized void bar()
{
notifyAll();
}
}