summaryrefslogtreecommitdiffstats
path: root/feature-distributed-locking
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-08-28 17:01:46 -0400
committerJim Hahn <jrh3@att.com>2020-08-28 17:04:29 -0400
commit22fda392c020fb6381afcc645554fd01636661ed (patch)
tree851d7989a6420a231f021c4eb7c9a28600c9a862 /feature-distributed-locking
parent3fb61743113683b2be271429263a96fb0a7dd90a (diff)
Fix sonar issue in distributed locking
Fixed sonar issue: - Refactor the code of the lambda to have only one invocation throwing an exception Issue-ID: POLICY-2616 Change-Id: I8d96b95d0da9a780daacec7a4de17167642b03c1 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-distributed-locking')
-rw-r--r--feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
index 48152715..0c0dbf11 100644
--- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
+++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java
@@ -258,7 +258,8 @@ public class DistributedLockManagerTest {
}
};
- assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, new Properties()))
+ Properties props = new Properties();
+ assertThatThrownBy(() -> feature.beforeCreateLockManager(engine, props))
.isInstanceOf(DistributedLockManagerException.class);
}