docs: protected final void checkForLock() throws LockException, RepositoryException {
          Lock lock = getLockIfExists();
          if (lock != null && !lock.isLockOwningSession() && lock.getLockToken() == null) {
              throw new LockException(JcrI18n.lockTokenNotHeld.text(location()));
          }
      }