docs: public Object getLock(Object key)
      {
          int index = (key.hashCode() & 0x7FFFFFFF) % locks.length;
  
          // Double-checked locking.  Safe since Object has no state.
          Object lock = locks[index];
          if (lock == null)
          {
              synchronized (this)
              {
                  lock = locks[index];
                  if (lock == null)
                  {
                      lock = new Object();
                      locks[index] = lock;
                  }
              }
          }
  
          return lock;
      }