Pavlin Radoslavov
Committed by Gerrit Code Review

Fix a bug inside DistributedLock.extendExpiration():

Return false (as per API) if we don't hold the lock.

Change-Id: Id3c314f6e374c92a73ce6f1aa4b6fbcef0a80697
...@@ -132,6 +132,7 @@ public class DistributedLock implements Lock { ...@@ -132,6 +132,7 @@ public class DistributedLock implements Lock {
132 if (!isLocked()) { 132 if (!isLocked()) {
133 log.warn("Ignoring request to extend expiration for lock {}." 133 log.warn("Ignoring request to extend expiration for lock {}."
134 + " ExtendExpiration must be called for locks that are already acquired.", path); 134 + " ExtendExpiration must be called for locks that are already acquired.", path);
135 + return false;
135 } 136 }
136 137
137 if (databaseService.putIfValueMatches( 138 if (databaseService.putIfValueMatches(
......