From 91493bfcb6690ed0d3817670d9fa8c5c0022d613 Mon Sep 17 00:00:00 2001 From: Indrijeet kumar Date: Tue, 28 Apr 2020 09:49:59 +0530 Subject: lowered some code smells lowered some code smells Issue-ID: PORTAL-869 Change-Id: Ia92c254b9fb9ddfe9db63889808eea07557c198a Signed-off-by: Indrijeet Kumar --- .../src/main/java/org/onap/music/main/DeadlockDetectionUtil.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java') diff --git a/music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java b/music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java index 23ccca7f..004bd550 100644 --- a/music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java +++ b/music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java @@ -47,7 +47,7 @@ public class DeadlockDetectionUtil { public Node(String id) { super(); this.id = id; - this.links = new ArrayList(); + this.links = new ArrayList<>(); } public List getLinks() { @@ -85,7 +85,7 @@ public class DeadlockDetectionUtil { } public DeadlockDetectionUtil() { - this.nodeList = new HashMap(); + this.nodeList = new HashMap<>(); } public void listAllNodes() { @@ -105,8 +105,7 @@ public class DeadlockDetectionUtil { currentNode = nodeList.get("o" + owner); } - boolean cycle = findCycle(currentNode); - return cycle; + return findCycle(currentNode); } private boolean findCycle(Node currentNode) { -- cgit 1.2.3-korg