aboutsummaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2018-12-18 15:26:14 +0530
committerezhil <ezhrajam@in.ibm.com>2018-12-18 15:26:24 +0530
commit50a756f026b92c964924437c9cccc73b0554e135 (patch)
tree83a2c1101929a7277d0f0d4044f7f6bd0c5e8e7a /resource-assignment/provider
parentce68f67d008c292f36d440f2dc473ba23d673fce (diff)
Fixed soanr issue in LockHelperImpl.java
Fixed major sonar issues Issue-ID: CCSDK-835 Change-Id: I53375dd95cdcec36f1a97630c9fdc2d9f57d8613 Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'resource-assignment/provider')
-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;
}