fixes coverity issue 141842

This commit is contained in:
Sebastian Stenzel
2016-08-14 14:45:38 +02:00
parent 3b3ebd2196
commit 6730a83cac
@@ -69,7 +69,8 @@ class ExclusiveSharedLockManager implements LockManager {
}
String token = DavConstants.OPAQUE_LOCK_TOKEN_PREFIX + UUID.randomUUID();
return lockedResources.computeIfAbsent(locator, loc -> new HashMap<>()).computeIfAbsent(token, t -> new ExclusiveSharedLock(t, lockInfo));
Map<String, ActiveLock> lockMap = Objects.requireNonNull(lockedResources.computeIfAbsent(locator, loc -> new HashMap<>()));
return lockMap.computeIfAbsent(token, t -> new ExclusiveSharedLock(t, lockInfo));
}
private void removedExpiredLocksInLocatorHierarchy(FileSystemResourceLocator locator) {