Skip to content

Commit c9d451c

Browse files
committed
Simplify equals in TripPatternForDate
1 parent 3e501b2 commit c9d451c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/TripPatternForDate.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public int hashCode() {
168168

169169
/**
170170
* The natural key of a TripPatternForDate is the pair (routing trip pattern id, service date).
171-
* TODO: align equals and hashcode to use only the pair (routing trip pattern id, service date)
172171
*/
173172
@Override
174173
public boolean equals(Object o) {
@@ -180,12 +179,7 @@ public boolean equals(Object o) {
180179
}
181180
TripPatternForDate that = (TripPatternForDate) o;
182181

183-
return (
184-
tripPattern.equals(that.tripPattern) &&
185-
serviceDate.equals(that.serviceDate) &&
186-
Arrays.equals(tripTimes, that.tripTimes) &&
187-
Arrays.equals(frequencies, that.frequencies)
188-
);
182+
return (tripPattern.equals(that.tripPattern) && serviceDate.equals(that.serviceDate));
189183
}
190184

191185
@Override

application/src/test/java/org/opentripplanner/routing/algorithm/mapping/SnapshotTestBase.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import static au.com.origin.snapshots.SnapshotMatcher.expect;
44
import static java.time.format.DateTimeFormatter.ISO_LOCAL_TIME;
5-
import static org.junit.jupiter.api.Assertions.assertEquals;
6-
import static org.junit.jupiter.api.Assertions.assertFalse;
75

86
import au.com.origin.snapshots.serializers.SerializerType;
97
import au.com.origin.snapshots.serializers.SnapshotSerializer;

0 commit comments

Comments
 (0)