diff options
author | 2018-03-21 10:21:56 +0100 | |
---|---|---|
committer | 2018-03-21 10:21:56 +0100 | |
commit | f104828c79f132688ee05555c309730e6ffc4186 (patch) | |
tree | 78d05630d6e428ffe9d1bf7803906f9b5c42bf76 /aai-core/src/main/java/org | |
parent | ea404c2e3dd25ae283345065b9956656306d70d9 (diff) |
Fixes in ListEndpoints
Change-Id: I2d67b7bc75da1c42f830368e75c5d166c310848b
Issue-ID: AAI-911
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'aai-core/src/main/java/org')
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/audit/ListEndpoints.java | 14 |
1 files changed, 6 insertions, 8 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 bfa8748c..52a014a5 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 @@ -53,8 +53,8 @@ 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 final static String start = "inventory"; + private final static String[] blacklist = { "search", "aai-internal" }; private List<String> endpoints = new ArrayList<>(); private Map<String, String> endpointToLogicalName = new HashMap<String, String>(); @@ -99,20 +99,18 @@ public class ListEndpoints { String currentUri = ""; - if (!obj.getDbName().equals("inventory")) { + if (!obj.getDbName().equals(start)) { currentUri = uri + obj.getGenericURI(); } else { currentUri = uri; } - if (obj.getName().equals("relationship-data") || obj.getName().equals("related-to-property")) { + if ("relationship-data".equals(obj.getName()) || "related-to-property".equals(obj.getName())) { return; } if (!obj.isContainer()) { endpoints.add(currentUri); } - String dbName = obj.getDbName(); - populateLogicalName(obj, uri, currentUri); Set<String> properties = obj.getProperties(); @@ -179,7 +177,7 @@ public class ListEndpoints { */ private void populateLogicalName(Introspector obj, String uri, String currentUri) { - if (obj.getDbName().equals("inventory") || currentUri.split("/").length <= 4 || currentUri.endsWith("relationship-list")) { + if (obj.getDbName().equals(start) || currentUri.split("/").length <= 4 || currentUri.endsWith("relationship-list")) { return; } @@ -251,7 +249,7 @@ public class ListEndpoints { List<String> result = new ArrayList<>(); Pattern p = null; Matcher m = null; - if (!filterOut.equals("")) { + if (!filterOut.isEmpty()) { p = Pattern.compile(filterOut); m = null; } |