diff options
author | Bharath Balasubramanian <bharathb@research.att.com> | 2020-04-08 16:54:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-08 16:54:14 +0000 |
commit | 90d1e3551488a73e74fb54d320be6e29678ca270 (patch) | |
tree | b47d23fdfdfd2b27c7d58bc3cfad6075dc2b6744 /music-core | |
parent | a295c28daf262d0b14c21f2ab94fb1e1fc820a94 (diff) | |
parent | 10d74ffbf1feb6eab011773cfe091f8610d7e736 (diff) |
Merge "removed code smells"
Diffstat (limited to 'music-core')
-rw-r--r-- | music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java | 2 | ||||
-rw-r--r-- | music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java b/music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java index c3866672..2e5ca689 100644 --- a/music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java +++ b/music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java @@ -24,8 +24,6 @@ package org.onap.music.main; import java.util.Properties; -import org.onap.music.eelf.logging.EELFLoggerDelegate; - public class CorePropertiesLoader { public static void loadProperties(Properties properties) { 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 4c9a74b7..23ccca7f 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 @@ -39,7 +39,8 @@ public class DeadlockDetectionUtil { @Override public String toString() { StringBuffer sb = new StringBuffer(); - for (Node link : links) sb.append(link.id); + for (Node link : links) + sb.append(link.id); return "Node [id=" + id + ", links=" + sb.toString() + ", visited=" + visited + ", onStack=" + onStack + "]"; } @@ -109,13 +110,17 @@ public class DeadlockDetectionUtil { } private boolean findCycle(Node currentNode) { - if (currentNode==null) return false; - if (currentNode.isOnStack()) return true; - if (currentNode.isVisited()) return false; + if (currentNode==null) + return false; + if (currentNode.isOnStack()) + return true; + if (currentNode.isVisited()) + return false; currentNode.setOnStack(true); currentNode.setVisited(true); for (Node childNode : currentNode.getLinks()) { - if (findCycle(childNode)) return true; + if (findCycle(childNode)) + return true; } currentNode.setOnStack(false); return false; |