Skip to content

Commit 7af76b4

Browse files
vpaturett2gran
andauthored
Update application/src/main/java/org/opentripplanner/routing/graphfinder/ChronologicalGraphPath.java
Co-authored-by: Thomas Gran <t2gran@gmail.com>
1 parent 936d442 commit 7af76b4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

application/src/main/java/org/opentripplanner/routing/graphfinder/ChronologicalGraphPath.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ static ChronologicalGraphPath of(State state) {
4747
// For depart-after, edges are in reverse chronological order; reverse to chronological.
4848
// For arriveBy, the A* searched backward so edges are already chronological.
4949
if (!state.getRequest().arriveBy()) {
50+
// We considered using `ArrayList.reversed()` (view) here, but there is no significant performance gain
51+
// and the graph deserialization would break. See PR #7455.
5052
Collections.reverse(edges);
5153
}
5254
return new ChronologicalGraphPath(edges, walkDistance);

0 commit comments

Comments
 (0)