Skip to content

Commit

Permalink
fix showing duration for escalator edges in debug client
Browse files Browse the repository at this point in the history
  • Loading branch information
tkalvas committed Dec 2, 2024
1 parent c161378 commit 21e183f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected Collection<KeyValue> map(Edge input) {
case StreetEdge e -> mapStreetEdge(e);
case EscalatorEdge e -> List.of(
kv("distance", e.getDistanceMeters()),
kv("duration", e.getDuration())
kv("duration", e.getDuration().map(d -> d.toString()).orElse(null))
);
default -> List.of();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.util.Optional;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.opentripplanner.utils.lang.StringUtils;

/**
* This class extend the Java {@link Duration} with utility functionality to parse and convert
Expand Down

0 comments on commit 21e183f

Please sign in to comment.