Skip to content

Conversation

@habrahamsson-skanetrafiken
Copy link
Contributor

Summary

This PR is a small refactor of the RouteRequestTransitDataProviderFilter. It doesn't change any behavior at all.

  • Adds a builder to simplify using this in places where we don't have a RouteRequest.
  • Renames the filter to DefaultTransitDataProviderFilter.

Unit tests

No new unit tests are added, but the builder makes a lot of tests much more readable.

Documentation

None needed IMO

Bumping the serialization version id

Nope

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken requested a review from a team as a code owner October 15, 2025 14:23
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken added the +Skip Changelog This is not a relevant change for a product owner since last release. label Oct 15, 2025
@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 95.89041% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.20%. Comparing base (1278304) to head (5474004).
⚠️ Report is 226 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...quest/DefaultTransitDataProviderFilterBuilder.java 94.64% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6974      +/-   ##
=============================================
+ Coverage      72.14%   72.20%   +0.05%     
- Complexity     19772    19866      +94     
=============================================
  Files           2151     2156       +5     
  Lines          79955    80091     +136     
  Branches        8058     8084      +26     
=============================================
+ Hits           57687    57827     +140     
+ Misses         19423    19419       -4     
  Partials        2845     2845              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@t2gran
Copy link
Member

t2gran commented Oct 16, 2025

[Refactor] ?

@t2gran t2gran added this to the 2.9 (next release) milestone Oct 16, 2025
@habrahamsson-skanetrafiken
Copy link
Contributor Author

Edit: Changed the commit messages to use "refactor:" instead of "[Refactor]".

jessicaKoehnke
jessicaKoehnke previously approved these changes Oct 17, 2025
Copy link
Contributor

@jessicaKoehnke jessicaKoehnke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification!

This is not documented in the api. But in order to not change behavior
an empty filter list in the request should discard everything.
@habrahamsson-skanetrafiken
Copy link
Contributor Author

I noticed a slight change in behavior. An explicitly empty filter list in the request would originally disallow all transit. This behavior is undocumented and differs from what we usually do. In order to not break any clients in the event that they are depending on this I fixed it and added a test.

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken merged commit 4ff26ea into opentripplanner:dev-2.x Oct 24, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Skip Changelog This is not a relevant change for a product owner since last release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants