docs: boolean detectDeadlock(Locker acquirer, Lock l, int mode) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "detectDeadlock", new Object[] { acquirer, l,
                                                           modeStrs[mode] });
          }
  
          boolean result = false;
  
          //----------------------------------------------------------------
          // Iterate through the holders of the given lock and determine if
          // any of them are waiting on a lock held by the requestor. If
          // any of them are then a deadlock exists.
          //----------------------------------------------------------------
  
          Enumeration holders = l.getHolders();
          while (holders.hasMoreElements()) {
              if (lockerWaitingOn((Locker) holders.nextElement(), acquirer)) {
                  result = true;
                  break;
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "detectDeadlock:" + result);
          }
          return result;
  
      }