All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
7.0.0 - 2026-08-01
- A new
AlertApicomposed entry point for the CTA Customer Alerts API, unauthenticated and constructed viaAlertApi.builder().build()(no API key required).RouteStatusApi, exposing route/line service status (list(),findByTypes,findByBusRouteIds,findByLines,findByStationId).DetailedAlertsApi, exposing detailed service alerts (list(AlertsQuery), plus filtered lookups by bus route IDs, train lines, and station IDs).- New domain models (
RouteStatus,Alert,ImpactedService,Severity,AlertTrainLine,ServiceType), feature-specific exceptions (Cta4jRouteStatusException,Cta4jDetailedAlertsException, both extending the new sharedCta4jAlertException), and error-code enums (RouteStatusErrorCode,DetailedAlertsErrorCode).
ArrivalsApi.findByMapIds/findByStopIds— multi-value lookups accepting up to 4 map/stop IDs per request (MapArrivalsQuery/StopArrivalsQuery, plusCollection<String>convenience overloads), alongside the existing single-IDfindByMapId/findByStopId.PredictionsApi.findByStopIds/findByVehicleIds— convenience overloads accepting a bareCollection<String>without requiring a fullStopPredictionsQuery/VehiclePredictionsQueryto be constructed, matchingArrivalsApi's equivalent overloads.
TrainLine.fromCode(String)no longer throwsIllegalArgumentExceptionfor an unrecognized code; it now returnsnulland logs a warning, matching the@Nullable-based degrade pattern used elsewhere in the SDK.ArrivalsErrorCode.fromCode/FollowErrorCode.fromCode/LocationsErrorCode.fromCodeno longer fall back to anUNKNOWNconstant for an unrecognized code; they now returnnull, matching the same degrade pattern asTrainLine.fromCode.- Renamed
VehiclesApi.findByIds's parameter fromidstovehicleIds, andfindById's parameter fromidtovehicleId, for consistency withStopsApi/PatternsApi's equivalent methods. - Bumped
tools.jackson.core:jackson-databindfrom 3.2.0 → 3.2.1 - Bumped
org.apache.httpcomponents.client5:httpclient5-fluentfrom 5.6.1 → 5.6.2 - Bumped
ch.qos.logback:logback-classicfrom 1.5.38 → 1.6.0
- Builder constructors are now
privateon all query-parameter builders (StopPredictionsQuery,VehiclePredictionsQuery,MapArrivalsQuery,StopArrivalsQuery,AlertsQuery,BusRouteAlertsQuery,LineAlertsQuery,StationAlertsQuery). Construct instances via the staticbuilder(...)factory method only. - Renamed
StopsPredictionsQuery/VehiclesPredictionsQuerytoStopPredictionsQuery/VehiclePredictionsQueryfor consistency with the rest of the query-builder naming. MapArrivalQuery/StopArrivalQueryhave been renamed and reshaped toMapArrivalsQuery/StopArrivalsQuery: the singleString mapId/stopIdcomponent is now aList<String> mapIds/stopIdscomponent (max 4 IDs).ArrivalsApi.findByMapId(MapArrivalQuery)/findByStopId(StopArrivalQuery)have been renamed tofindByMapIds(MapArrivalsQuery)/findByStopIds(StopArrivalsQuery)to match the new query types.ArrivalsErrorCode.UNKNOWN/FollowErrorCode.UNKNOWN/LocationsErrorCode.UNKNOWNhave been removed; code that referenced these constants directly (e.g.switchstatements, equality checks) must handlenullinstead.MapArrivalsQuery.Builder.maxResults/StopArrivalsQuery.Builder.maxResultsnow takeintinstead ofInteger; passingnullno longer compiles.Arrival.line/TrainLocations.lineare now@Nullable, a direct consequence ofTrainLine.fromCodeno longer throwing — code that assumed either was always non-null must add a null check.LocationsApi.findAll()has been renamed toLocationsApi.list().
6.0.0 - 2026-07-05
- Comprehensive test suite covering
*ApiImplclasses (WireMock integration tests), MapStruct mappers, domain models, enums, query objects, and qualifiers. @throwsjavadoc documented on every public API method that may throw on error or parse failure, using the feature-specific exception type (e.g.Cta4jBusExceptionon bus interfaces;Cta4jArrivalsException/Cta4jFollowException/Cta4jLocationsException/Cta4jTrainExceptionon train interfaces).- Structured exception hierarchy:
Cta4jBusException(bus, shared across every feature) andCta4jTrainException(train, shared across every feature; used directly byStationsApiImpland trainQualifiers), plus feature-specificCta4jArrivalsException/Cta4jFollowException/Cta4jLocationsException, each exposing agetRawErrorCode()/getErrorCode()pair backed by the newArrivalsErrorCode/FollowErrorCode/LocationsErrorCodeenums (verified against the CTA Train Tracker API's documented error codes). Cta4jException.getEndpoint()— a required, always-populated accessor for the endpoint or URL associated with any exception the SDK throws.
- Internal wire layer refactored: the generic
CtaBustimeResponse<T>envelope replaced with feature-specific typed response records per endpoint, improving type safety and removing cross-feature coupling. CtaError(bus) refactored from a concrete record to an interface, allowing each feature to define its own typed error record with resource-specific fields for accurate not-found classification.- Bumped
tools.jackson.core:jackson-databindfrom 3.1.3 → 3.2.0
StopsPredictionsQuery.Builder.maxResultsandVehiclesPredictionsQuery.Builder.maxResultsnow takeintinstead ofInteger; passingnullno longer compiles.StopsPredictionsQueryandVehiclesPredictionsQuerynow throwIllegalArgumentExceptionat construction time when more than 10 IDs are supplied, instead of deferring to the CTA API's own error response.Cta4jException.getMessage()no longer includes the"Error response from %s: ..."prefix; it now returns CTA's raw reported text unmodified, sincegetEndpoint()and the error-code accessors now carry that context as structured fields.
5.0.0 - 2026-05-22
- Renamed
routefield torouteIdonVehicleandPredictionrecords for consistency with the rest of the API.
Vehicle.route()has been renamed toVehicle.routeId().Prediction.route()has been renamed toPrediction.routeId().
4.1.0 - 2026-05-21
PredictionsApi.findByStopId(String stopId)— a convenience default method that retrieves predictions for a single stop ID without requiring a fullStopsPredictionsQueryto be constructed.
- Bumped
tools.jackson.core:jackson-databindfrom 3.1.2 → 3.1.3 - Bumped
org.apache.httpcomponents.client5:httpclient5-fluentfrom 5.6 → 5.6.1 - Bumped
org.slf4j:slf4j-apifrom 2.0.17 → 2.0.18
4.0.3 - 2026-04-14
- Bumped
tools.jackson.core:jackson-databindfrom 3.1.1 → 3.1.2
4.0.2 - 2026-04-06
- Updated project URL from
cta4j.comtohttps://github.com/lbkulinski/cta4j-java-sdk. - Bumped
tools.jackson.core:jackson-databindfrom 3.1.0 → 3.1.1
4.0.1 - 2026-03-15
- Updated project URL from
cta4j.apptocta4j.com. - Excluded internal packages from published Javadoc.
4.0.0 – 2026-03-15
- JSpecify nullability annotations (using
@NullMarked/@Nullable) on public API types and methods for improved nullability contracts. org.jspecify:jspecify:1.0.0dependency to provide these annotations.- A new composed Bus API surface (
BusApi) that exposes domain-specific sub-APIs (e.g. routes, stops, vehicles, predictions, detours) instead of a flat client.- Dedicated API interfaces for each Bus domain (e.g.
RoutesApi,StopsApi,VehiclesApi,PredictionsApi,DetoursApi, etc.), improving discoverability and separation of concerns. - Clear separation between public domain models, internal wire models, and implementation details, enabling safer evolution of the SDK.
- Dedicated API interfaces for each Bus domain (e.g.
- A new composed Train API surface (
TrainApi) that similarly organizes train-related functionality into domain-specific sub-APIs.- Dedicated API interfaces for each Train domain (e.g.
StationsApi,ArrivalsApi,FollowApi, etc.), improving discoverability and separation of concerns. - Clear separation between public domain models, internal wire models, and implementation details, enabling safer evolution of the SDK.
- Dedicated API interfaces for each Train domain (e.g.
- Major refactor of the Bus/Train API architecture, replacing the previous flat
Bus/TrainClient-style interface with a hierarchical, capability-based API. - Method names across the Bus/Train API were aligned to more consistent, domain-driven naming conventions.
- Error-handling behavior for some Bus/Train endpoints was standardized to better reflect CTA API semantics.
- Package structure was reorganized to clearly distinguish public APIs, internal implementations, and wire / CTA response models.
- Public APIs are now explicitly null-annotated, tightening contracts and surfacing potential misuse at compile time.
- Bumped
tools.jackson.core:jackson-databindfrom 3.0.4 → 3.1.0 - Bumped
org.jetbrains:annotationsfrom 26.0.2-1 → 26.1.0
- Deprecated or legacy Bus/Train client entry points that no longer fit the new API model.
- This release is not source-compatible with earlier versions.
- Consumers must migrate from the previous Bus/Train client interfaces to the new
BusApi/TrainApiand its sub-APIs. - Method signatures, return types, and package names for Bus/Train-related APIs have changed as part of the refactor.
3.0.4 - 2025-12-30
- Bumped
tools.jackson.core:jackson-databindfrom 3.0.2 → 3.0.3 - Bumped
org.apache.httpcomponents.client5:httpclient5from 5.5.1 → 5.6 - Bumped
org.apache.maven.plugins:maven-source-pluginfrom 3.3.1 → 3.4.0 - BREAKING CHANGE: Removed
module-info.java, dropping explicit JPMS module support. The library is now an automatic module, which may change the effective module name and impact consumers using the Java module system.
3.0.3 - 2025-11-28
- Changed edge case where coordinates could be null in Follow Train API responses.
- If both the position is
nulland the arrivals list is empty, an emptyOptionalis returned.
- If both the position is
3.0.2 - 2025-11-28
- Fixed edge case where coordinates could be null in Follow Train API responses.
3.0.1 - 2025-11-28
- Separated GitHub Actions workflows for build and release.
- Corrected LICENSE file copyright.
- Migrated from
jackson-databind2.20.1to3.0.2.
3.0.0 - 2025-10-18
- A new type
UpcomingBusArrivalrepresenting upcoming bus arrival information. - A new type
BusCoordinatesrepresenting bus coordinates (latitude, longitude, heading). - An
arrivalsfield of typeList<UpcomingBusArrival>has been added to theBusclass to provide information about upcoming bus arrivals.
- BREAKING CHANGE: Organized classes into packages by functionality:
com.cta4j.busfor bus-related classescom.cta4j.trainfor train-related classescom.cta4j.commonfor shared/common classes
- BREAKING CHANGE: Public concrete client classes replaced by interfaces with a fluent
BuilderAPI (e.g.BusClient,TrainClient)- Create clients via
XxxClient.builder()...build()instead of instantiating implementation classes.
- Create clients via
- BREAKING CHANGE: The
Busclass has moved latitude, longitude, and heading fields into a field of typeBusCoordinates. - Implementation classes are now internal and may be excluded from source/javadoc artifacts.
2.0.2 - 2025-10-17
ch.qos.logback:logback-classic:1.5.19ch.qos.logback:logback-core:1.5.19
2.0.1 - 2025-10-17
- Dependency: logback-core 1.5.19
- Temporary fix for vulnerability in logback-classic (CVE-2025-11226)
- Bumped org.apache.maven.plugins:maven-javadoc-plugin from 3.8.0 to 3.12.0
- Bumped org.apache.maven.plugins:maven-gpg-plugin from 3.2.4 to 3.2.8
- Dependency: org.jetbrains.annotations 26.0.2-1
Trainclass andgetTrainmethod inTrainClientclass.@ApiStatus.Internaland@JsonIgnoreProperties(ignoreUnknown = true)to relevant internal classes.
- Improve
HttpUtilsresponse handling. - Improve handling for erroneous responses from the CTA API.
- Update
exportsstatements toopensstatements inmodule-info.javafor Jackson reflection compatibility.
TrainLocationclass andgetTrainLocationmethod inTrainClientclass.- Internal classes from Maven Javadoc and source JARs.
- Additional validation and logging during deserialization of CTA API responses.
exportsstatements inmodule-info.javafor Jackson reflection compatibility.logback.xmlconfiguration file for logging.
- Maven compiler target and source to 21 from 25 for increase compatibility.
- Various primitive type fields to wrapper classes or
Stringto handle null values from the CTA API.
- JavaDoc comments for all public classes and methods.
- JavaDoc comments for some public classes and methods.
Busclass andgetBusmethod inBusClientclass.
- Improve serialization of responses from the CTA API.
Vehicleclass andgetVehiclemethod inBusClientclass.parseStringmethod fromBusPredictionTypeenum.fromExternalmethod fromDetourclass.fromExternalmethod from busRouteclass.fromExternalmethod fromStopclass.fromExternalmethod fromStopArrivalclass.parseStringmethod from trainRouteenum.fromExternalmethod fromStationArrivalenum.fromExternalmethod fromTrainCoordinatesclass.fromExternalmethod fromUpcomingTrainArrivalenum.com.cta4j.utilexport frommodule-info.java.
- Initial release of SDK
TrainClientclass with methods to interact with CTA Train API.BusClientclass with methods to interact with CTA Bus API.