Skip to content

Filter out null, empty and blank elements when mapping feed-scoped ids - #5428

Merged
vpaturet merged 1 commit into
opentripplanner:dev-2.xfrom
entur:filter_out_null_feed_scoped_id
Oct 24, 2023
Merged

vpaturet merged 1 commit into
opentripplanner:dev-2.xfrom
entur:filter_out_null_feed_scoped_id

Conversation

@vpaturet

Copy link
Copy Markdown
Contributor

Summary

As detailed in #5398, specifying a null id in the list of whitelisted lines for estimated calls causes an exception.
Null values should not be allowed as input parameters in this case.

This PR provides a general fix by filtering out null, empty and blank values when mapping ids to feed-scoped ids.

Issue

Closes #5398

Unit tests

Added unit tests

Documentation

No

@vpaturet vpaturet added !Improvement A functional improvement or micro feature Entur Test This is currently being tested at Entur labels Oct 13, 2023
@vpaturet vpaturet self-assigned this Oct 13, 2023
@vpaturet
vpaturet force-pushed the filter_out_null_feed_scoped_id branch from 47a5d6a to 92905e5 Compare October 13, 2023 09:07
@codecov

codecov Bot commented Oct 13, 2023 •

Copy link
Copy Markdown

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (dcc4037) 66.58% compared to head (dedbd23) 66.59%.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5428      +/-   ##
=============================================
+ Coverage      66.58%   66.59%   +0.01%     
- Complexity     15317    15321       +4     
=============================================
  Files           1792     1792              
  Lines          69538    69534       -4     
  Branches        7333     7332       -1     
=============================================
+ Hits           46299    46307       +8     
+ Misses         20756    20746      -10     
+ Partials        2483     2481       -2     
Files Coverage Δ
...ner/ext/transmodelapi/mapping/TransitIdMapper.java 71.87% <100.00%> (+23.22%) ⬆️
...ner/ext/transmodelapi/TransmodelGraphQLSchema.java 66.84% <0.00%> (ø)
...ext/transmodelapi/mapping/SelectRequestMapper.java 0.00% <0.00%> (ø)
...t/transmodelapi/model/plan/JourneyWhiteListed.java 32.14% <0.00%> (-1.20%) ⬇️
...lanner/ext/transmodelapi/mapping/FilterMapper.java 2.73% <0.00%> (ø)
...r/ext/transmodelapi/mapping/TripRequestMapper.java 56.60% <0.00%> (ø)

... and 2 files with indirect coverage changes

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

@vpaturet
vpaturet force-pushed the filter_out_null_feed_scoped_id branch from 92905e5 to dedbd23 Compare October 13, 2023 09:18
@vpaturet
vpaturet marked this pull request as ready for review October 13, 2023 09:28
@vpaturet
vpaturet requested a review from a team as a code owner October 13, 2023 09:28
@vpaturet
vpaturet requested a review from t2gran October 20, 2023 09:04
@vpaturet
vpaturet merged commit 9fda8ed into opentripplanner:dev-2.x Oct 24, 2023
t2gran pushed a commit that referenced this pull request Oct 24, 2023
@vpaturet
vpaturet deleted the filter_out_null_feed_scoped_id branch October 24, 2023 11:08
@t2gran t2gran added this to the 2.5 (next release) milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur !Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null-value handling in authorities/lines/networks whitelisting

4 participants