docs: protected final void checkForLock() throws LockException, RepositoryException {
  
          if (getParent().isLockedByAnotherSession()) {
              Lock parentLock = this.getParent().getLock();
              if (parentLock != null && parentLock.getLockToken() == null) {
                  throw new LockException(JcrI18n.lockTokenNotHeld.text(node.location()));
              }
          }
      }