aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java
index 1611b537..0efd8977 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/LockHelperImpl.java
@@ -73,6 +73,7 @@ public class LockHelperImpl implements LockHelper {
try {
Thread.sleep(lockWait * 1000);
} catch (InterruptedException ex) {
+ log.error("Interrupted Exception", ex);
}
}
}
@@ -80,7 +81,7 @@ public class LockHelperImpl implements LockHelper {
@Override
public void unlock(Collection<String> lockNames, boolean force) {
- if (lockNames == null || lockNames.size() == 0) {
+ if (lockNames == null || lockNames.isEmpty()) {
return;
}
@@ -105,7 +106,7 @@ public class LockHelperImpl implements LockHelper {
}
public void tryLock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */) {
- if (resourceNameList == null || resourceNameList.size() == 0) {
+ if (resourceNameList == null || resourceNameList.isEmpty()) {
return;
}