aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatej Babej <matej.babej@tieto.com>2020-02-11 14:23:17 +0100
committerMatej Babej <matej.babej@tieto.com>2020-02-13 09:31:24 +0100
commitf9023e161b8af6bddcdea5f52c2644608e7aa8c8 (patch)
treef591c6d0ce1d785050e940530ad82b01d21e870e
parentb83ec09ba5049776ef7b0db3c2a5a02e868ee01c (diff)
ListEndpoints fix
Fixing 4 code smells Issue-ID: AAI-2794 Change-Id: Ica204021dd343ec7deac01587287e361efda4643 Signed-off-by: Matej Babej <matej.babej@tieto.com>
-rw-r--r--aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java b/aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java
index aed61e7a..dcfd58a5 100644
--- a/aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java
+++ b/aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java
@@ -38,7 +38,6 @@ import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.onap.aai.config.SpringContextAware;
-import org.onap.aai.db.props.AAIProperties;
import org.onap.aai.introspection.Introspector;
import org.onap.aai.introspection.Loader;
import org.onap.aai.introspection.LoaderFactory;
@@ -56,11 +55,11 @@ public class ListEndpoints {
private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(ListEndpoints.class);
- private final String start = "inventory";
- private final String[] blacklist = {"search", "aai-internal"};
+ private static final String START = "inventory";
+ private static final String[] blacklist = {"search", "aai-internal"};
private List<String> endpoints = new ArrayList<>();
- private Map<String, String> endpointToLogicalName = new HashMap<String, String>();
+ private Map<String, String> endpointToLogicalName = new HashMap<>();
/**
* The main method.
@@ -97,11 +96,11 @@ public class ListEndpoints {
Loader loader = SpringContextAware.getBean(LoaderFactory.class).createLoaderForVersion(ModelType.MOXY, version);
try {
- final Introspector start = loader.introspectorFromName(this.start);
+ final Introspector start = loader.introspectorFromName(this.START);
Set<String> startMap = new HashSet<>();
beginAudit(start, basePath + "/" + version, startMap);
} catch (AAIUnknownObjectException e) {
- throw new RuntimeException("Failed to find object " + this.start + ", cannot run ListEndpoints audit");
+ throw new RuntimeException("Failed to find object " + this.START + ", cannot run ListEndpoints audit");
}
}