Reports nested synchronized statements. It is recommended to avoid nested synchronization if possible, because in some cases it may lead to a deadlock.

Example:


  synchronized (lockA){
    //thread 1 is waiting for lockB
    synchronized (lockB){ //warning
    }
  }
  ...
  synchronized (lockB) {
    //thread 2 is waiting for lockA
    synchronized (lockA) { //warning
    }
  }