Skip to content

Commit

Permalink
missing exception call fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CubBossa committed Aug 7, 2024
1 parent 0051302 commit cd07a66
Showing 1 changed file with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,31 +403,27 @@ private PathSolverResult<Node, Double> findShortestPathBetweenSegments(ValueGrap
}

private ValueGraph<Node, Double> connect(NavigationLocation location, ValueGraph<Node, Double> graph, boolean entry, boolean exit) {
try {
if (!location.isExternal()) {
return graph;
if (!location.isExternal()) {
return graph;
}
MutableValueGraph<Node, Double> g;
if (entry) {
if (exit) {
g = graphEntrySolver.solve(location.getNode(), GraphUtils.mutable(graph));
} else {
g = graphEntrySolver.solveEntry(location.getNode(), GraphUtils.mutable(graph));
}
MutableValueGraph<Node, Double> g;
if (entry) {
if (exit) {
g = graphEntrySolver.solve(location.getNode(), GraphUtils.mutable(graph));
} else {
g = graphEntrySolver.solveEntry(location.getNode(), GraphUtils.mutable(graph));
}
} else {
if (exit) {
g = graphEntrySolver.solveExit(location.getNode(), GraphUtils.mutable(graph));
} else {
if (exit) {
g = graphEntrySolver.solveExit(location.getNode(), GraphUtils.mutable(graph));
} else {
throw new GraphEntryNotEstablishedException();
}
throw new GraphEntryNotEstablishedException();
}
location.setNode(g.nodes().stream()
.filter(n -> n.getNodeId().equals(location.getNode().getNodeId())).findAny()
.orElseThrow());
return g;
} catch (GraphEntryNotEstablishedException ignored) {
}
return graph;
location.setNode(g.nodes().stream()
.filter(n -> n.getNodeId().equals(location.getNode().getNodeId())).findAny()
.orElseThrow());
return g;
}

@SafeVarargs
Expand Down

0 comments on commit cd07a66

Please sign in to comment.