Skip to content
Snippets Groups Projects
Commit 23b098f7 authored by Peter Wagenhuber's avatar Peter Wagenhuber
Browse files

make sure that the path for the payload droplet is uniquie, @peda

parent 90fa3763
No related branches found
No related tags found
No related merge requests found
......@@ -126,12 +126,17 @@ public class Nloc {
}
public List<Channel> getDesiredPath(List<Channel> modules,
List<List<Channel>> pathlist) {
List<List<Channel>> pathlist) throws NlocStructureException {
List<Channel> found = new ArrayList<Channel>();
for (List<Channel> path : pathlist) {
if (path.containsAll(modules)) {
if (path.containsAll(modules) && found.isEmpty()) {
found = path;
}
} else if (path.containsAll(modules) && !found.isEmpty()) {
throw new NlocStructureException("Paths are not unique!");
}
}
if (found.isEmpty()) {
throw new NlocStructureException("No path found that covers all given Modules");
}
return found;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment