Back to Intellij Community

WaitOrAwaitWithoutTimeout

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

2025.3-rc-2391 B
Original Source

Reports calls to Object.wait() or Condition.await() without specifying a timeout.

Such calls may be dangerous in high-availability programs, as failures in one component may result in blockages of the waiting component if notify()/notifyAll() or signal()/signalAll() never get called.

Example:

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