From c5d1183e2a0412b48fadbf0a1b0bb7075b347465 Mon Sep 17 00:00:00 2001 From: Samuel Cedarbaum Date: Thu, 9 Jan 2025 19:46:09 -0500 Subject: [PATCH 1/3] Move TestDataFetcherDecorator to correct package path --- .../transmodel}/_support/TestDataFetcherDecorator.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename application/src/test/java/org/opentripplanner/{ext/transmodelapi => apis/transmodel}/_support/TestDataFetcherDecorator.java (100%) diff --git a/application/src/test/java/org/opentripplanner/ext/transmodelapi/_support/TestDataFetcherDecorator.java b/application/src/test/java/org/opentripplanner/apis/transmodel/_support/TestDataFetcherDecorator.java similarity index 100% rename from application/src/test/java/org/opentripplanner/ext/transmodelapi/_support/TestDataFetcherDecorator.java rename to application/src/test/java/org/opentripplanner/apis/transmodel/_support/TestDataFetcherDecorator.java From 872dbb36ee4f6fa7e1b076df7f88a1d67235f43c Mon Sep 17 00:00:00 2001 From: Samuel Cedarbaum Date: Thu, 9 Jan 2025 19:46:46 -0500 Subject: [PATCH 2/3] Add explicit cast when calling createFromDocumentedEnum --- .../org/opentripplanner/apis/transmodel/model/EnumTypes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java index 2f8e69cc593..aab06381100 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java @@ -221,7 +221,7 @@ public class EnumTypes { public static final GraphQLEnumType OCCUPANCY_STATUS = createFromDocumentedEnum( "OccupancyStatus", - List.of( + List.>of( map("noData", OccupancyStatus.NO_DATA_AVAILABLE), map("empty", OccupancyStatus.EMPTY), map("manySeatsAvailable", OccupancyStatus.MANY_SEATS_AVAILABLE), From e23144bf9b611019f95cb1b4b2fa1f26df906b34 Mon Sep 17 00:00:00 2001 From: Samuel Cedarbaum Date: Thu, 9 Jan 2025 19:56:28 -0500 Subject: [PATCH 3/3] Add type annotation to OccupancyStatus instead of explicit cast --- .../org/opentripplanner/apis/transmodel/model/EnumTypes.java | 2 +- .../transit/model/timetable/OccupancyStatus.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java index aab06381100..2f8e69cc593 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/EnumTypes.java @@ -221,7 +221,7 @@ public class EnumTypes { public static final GraphQLEnumType OCCUPANCY_STATUS = createFromDocumentedEnum( "OccupancyStatus", - List.>of( + List.of( map("noData", OccupancyStatus.NO_DATA_AVAILABLE), map("empty", OccupancyStatus.EMPTY), map("manySeatsAvailable", OccupancyStatus.MANY_SEATS_AVAILABLE), diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/OccupancyStatus.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/OccupancyStatus.java index 9c32ca39394..fe760747ef4 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/timetable/OccupancyStatus.java +++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/OccupancyStatus.java @@ -9,7 +9,7 @@ *

* Descriptions are copied from the GTFS-RT specification with additions of SIRI nordic profile documentation. */ -public enum OccupancyStatus implements DocumentedEnum { +public enum OccupancyStatus implements DocumentedEnum { NO_DATA_AVAILABLE, EMPTY, MANY_SEATS_AVAILABLE,