mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 08:40:29 +00:00
VRS: Fix ArrayIndexOutOfBoundsException when substituting walking departure/arrival times.
This commit is contained in:
parent
cc55fb4725
commit
c0463780f3
1 changed files with 3 additions and 6 deletions
|
@ -924,13 +924,10 @@ public class VrsProvider extends AbstractNetworkProvider
|
|||
if (type.equals("walk"))
|
||||
{
|
||||
if (departurePlanned == null)
|
||||
{
|
||||
departurePlanned = legs.get(iSegment - 1).getArrivalTime();
|
||||
}
|
||||
departurePlanned = legs.get(legs.size() - 1).getArrivalTime();
|
||||
if (arrivalPlanned == null)
|
||||
{
|
||||
arrivalPlanned = new Date(legs.get(iSegment - 1).getArrivalTime().getTime() + traveltime * 1000);
|
||||
}
|
||||
arrivalPlanned = new Date(departurePlanned.getTime() + traveltime * 1000);
|
||||
|
||||
legs.add(new Trip.Individual(Trip.Individual.Type.WALK, segmentOrigin, departurePlanned, segmentDestination, arrivalPlanned,
|
||||
points, (int) distance));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue