diff options
Diffstat (limited to 'resource-assignment/provider')
2 files changed, 6 insertions, 3 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 1611b5372..0efd8977a 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; } diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/ResourceLockedException.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/ResourceLockedException.java index 4b90b265e..f503332cc 100644 --- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/ResourceLockedException.java +++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/lock/comp/ResourceLockedException.java @@ -25,7 +25,9 @@ public class ResourceLockedException extends RuntimeException { private static final long serialVersionUID = 1L; - private String lockName, lockHolder, lockRequester; + private final String lockName; + private final String lockHolder; + private final String lockRequester; public ResourceLockedException(String lockName, String lockHolder, String lockRequester) { this.lockName = lockName; |