X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FPathFinder.java;h=fe3fdb6e85bfa443bddcc998ca41fd353d5ff516;hp=d86b1e4d41c78bc22b70d22bfef1a8cb383c064c;hb=98572b78fcce9ff28fa7429c9265812bd1e78bf2;hpb=cec9a9227c805ff5415d6b9fd913fa64adafdd3a diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/PathFinder.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/PathFinder.java index d86b1e4d..fe3fdb6e 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/PathFinder.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/PathFinder.java @@ -35,7 +35,7 @@ import org.onap.dmaap.datarouter.node.NodeConfig.ProvHop; * get from this node to any other node. */ -public class PathFinder { +class PathFinder { private ArrayList errors = new ArrayList<>(); private HashMap routes = new HashMap<>(); @@ -47,7 +47,7 @@ public class PathFinder { * @param nodes where we can go * @param hops detours along the way */ - public PathFinder(String origin, String[] nodes, NodeConfig.ProvHop[] hops) { + PathFinder(String origin, String[] nodes, NodeConfig.ProvHop[] hops) { HashSet known = new HashSet<>(); HashMap> ht = new HashMap<>(); for (String n : nodes) { @@ -77,8 +77,8 @@ public class PathFinder { * * @return array of error descriptions */ - public String[] getErrors() { - return (errors.toArray(new String[errors.size()])); + String[] getErrors() { + return (errors.toArray(new String[0])); } /** @@ -87,7 +87,7 @@ public class PathFinder { * @param destination node * @return list of node names separated by and ending with "/" */ - public String getPath(String destination) { + String getPath(String destination) { String ret = routes.get(destination); if (ret == null) { return ("");