Fixing 4 code smells
Issue-ID: AAI-2794
Change-Id: Ica204021dd343ec7deac01587287e361efda4643
Signed-off-by: Matej Babej <matej.babej@tieto.com>
import org.apache.commons.lang.StringUtils;
import org.onap.aai.config.SpringContextAware;
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;
import org.onap.aai.introspection.Introspector;
import org.onap.aai.introspection.Loader;
import org.onap.aai.introspection.LoaderFactory;
private static final EELFLogger LOGGER = EELFManager.getInstance().getLogger(ListEndpoints.class);
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 List<String> endpoints = new ArrayList<>();
- private Map<String, String> endpointToLogicalName = new HashMap<String, String>();
+ private Map<String, String> endpointToLogicalName = new HashMap<>();
Loader loader = SpringContextAware.getBean(LoaderFactory.class).createLoaderForVersion(ModelType.MOXY, version);
try {
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) {
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");