aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-04-06 18:58:23 +0530
committerTschaen, Brendan <ctschaen@att.com>2020-04-29 14:17:52 -0400
commita800da6479f0a8814810a206ac019984fe931b19 (patch)
treeccc9c8b9f39a3067ea1f33f581dfc4eb478540b8
parent1f3a99d09b6da12dffdc1c5538caa611be2cd248 (diff)
removed code smells
Removed some unused imports and 2 statments from one line Issue-ID: PORTAL-869 Change-Id: I99f97a7a7c16a4ff2d28c40cfd88546dfe799a29 Signed-off-by: Rupindewr<rupinsi1@in.ibm.com>
-rw-r--r--music-core/src/main/java/org/onap/music/main/CorePropertiesLoader.java2
-rw-r--r--music-core/src/main/java/org/onap/music/main/DeadlockDetectionUtil.java15
-rwxr-xr-xmusic-rest/src/main/java/org/onap/music/rest/RestMusicQAPI.java6
3 files changed, 14 insertions, 9 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;
diff --git a/music-rest/src/main/java/org/onap/music/rest/RestMusicQAPI.java b/music-rest/src/main/java/org/onap/music/rest/RestMusicQAPI.java
index 4def0e45..63b72cda 100755
--- a/music-rest/src/main/java/org/onap/music/rest/RestMusicQAPI.java
+++ b/music-rest/src/main/java/org/onap/music/rest/RestMusicQAPI.java
@@ -174,9 +174,11 @@ public class RestMusicQAPI {
clusteringKey=clusteringKey.replaceAll("[\\(]+","");
clusteringKey=clusteringKey.replaceAll("[\\)]+","");
clusteringKey = clusteringKey.trim();
- if (clusteringKey.indexOf(',') == 0) clusteringKey=clusteringKey.substring(1);
+ if (clusteringKey.indexOf(',') == 0)
+ clusteringKey=clusteringKey.substring(1);
clusteringKey = clusteringKey.trim();
- if (clusteringKey.equals(",") ) clusteringKey=""; // print error if needed ( ... ),)
+ if (clusteringKey.equals(",") )
+ clusteringKey=""; // print error if needed ( ... ),)
}
}