You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

631 B

A call which may execute arbitrary code (such as registered, or chained, callbacks) is made while a lock is held. This code may deadlock whenever the callbacks obtain locks themselves, so it is an unsafe pattern. This warning is issued only at the innermost lock acquisition around the final call.

Example:

public class NotUnderLock {
  SettableFuture future = null;

  public void callFutureSetOk() {
    future.set(null);
  }

  public synchronized void firstAcquisitionBad() {
    callFutureSetOk();
  }

  public void secondAcquisitionOk(Object o) {
    synchronized (o) {
      firstAcquisitionBad();
    }
  }
}