Skip to content

Commit

Permalink
add Nullable annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
miklcct committed Nov 8, 2024
1 parent 9673c2e commit 1491636
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import javax.annotation.Nullable;
import org.opentripplanner.framework.i18n.I18NString;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.site.StopLocation;
Expand All @@ -31,7 +32,10 @@ public class TripTimeOnDate {
private final int stopIndex;
// This is only needed because TripTimes has no reference to TripPattern
private final TripPattern tripPattern;

@Nullable
private final LocalDate serviceDate;

private final long midnight;

public TripTimeOnDate(TripTimes tripTimes, int stopIndex, TripPattern tripPattern) {
Expand All @@ -46,8 +50,8 @@ public TripTimeOnDate(
TripTimes tripTimes,
int stopIndex,
TripPattern tripPattern,
LocalDate serviceDate,
Instant midnight
@Nullable LocalDate serviceDate,
@Nullable Instant midnight
) {
this.tripTimes = tripTimes;
this.stopIndex = stopIndex;
Expand Down

0 comments on commit 1491636

Please sign in to comment.