if (lockToken == null) {
throw new DavException(DavServletResponse.SC_PRECONDITION_FAILED);
}
ActiveLock lock = getLock(reqLockInfo.getType(), reqLockInfo.getScope());
if (lock == null) {
throw new DavException(DavServletResponse.SC_PRECONDITION_FAILED, "No lock with the given scope/type present on this resource.");
}
if (Type.WRITE.equals(lock.getType())) {
try {
Lock jcrLock = ((Node) item).getLock();
jcrLock.refresh();
return new JcrActiveLock(jcrLock, EXCLUSIVE_SESSION.equals(lock.getScope()));
} catch (RepositoryException e) {
/*
NOTE: LockException is only thrown by Lock.refresh()
the lock exception thrown by Node.getLock() was circumvented
by the init test if there is a lock applied...