Back to Intellij Community

WaitWithoutCorrespondingNotify

java/java-impl/resources/inspectionDescriptions/WaitWithoutCorrespondingNotify.html

2025.3-rc-2380 B
Original Source

Reports calls to Object.wait(), for which no call to the corresponding Object.notify() or Object.notifyAll() can be found.

This inspection only reports calls with qualifiers referencing fields of the current class.

Example:

public class Foo {
    public Object foo = new Object();

    void bar() throws InterruptedException {
      this.foo.wait();
    }
  }