Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TransitModelIndex more immutable #6140

Conversation

habrahamsson-skanetrafiken
Copy link
Contributor

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken commented Oct 10, 2024

Summary

In this PR:

  • Hide most of the maps in TransitModelIndex.
  • Make collections returned by TransitModelIndex unmodifiable.
  • Remove functionality from TransitModelIndex that already exists in TransitModel.

Issue

See #6048

Unit tests

Some of the stuff in TransitModelIndex is untested. I didn't add any tests.

Documentation

Didn't add any documentation.

Bumping the serialization version id

I guess, since I'm changing the signature of the TransitModel?

@leonardehrenfried
Copy link
Member

Needs to be even immutabler!

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 62.16216% with 14 lines in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (9e58db4) to head (629562b).
Report is 84 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...planner/transit/service/DefaultTransitService.java 56.25% 7 Missing ⚠️
...tripplanner/transit/service/TransitModelIndex.java 64.70% 5 Missing and 1 partial ⚠️
...in/java/org/opentripplanner/netex/NetexModule.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6140      +/-   ##
=============================================
- Coverage      69.85%   69.84%   -0.02%     
- Complexity     17491    17669     +178     
=============================================
  Files           1976     1995      +19     
  Lines          74712    75267     +555     
  Branches        7645     7702      +57     
=============================================
+ Hits           52192    52571     +379     
- Misses         19868    20024     +156     
- Partials        2652     2672      +20     

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

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken added the bump serialization id Add this label if you want the serialization id automatically bumped after merging the PR label Oct 10, 2024
@vpaturet vpaturet self-requested a review October 11, 2024 07:20
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken merged commit 1e8ff41 into opentripplanner:dev-2.x Oct 11, 2024
5 checks passed
t2gran pushed a commit that referenced this pull request Oct 11, 2024
@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump serialization id Add this label if you want the serialization id automatically bumped after merging the PR Skip Changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants