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

Add @Nullable annotations to Trip and Leg #6147

Conversation

habrahamsson-skanetrafiken
Copy link
Contributor

Summary

Add @Nullable annotiation to stuff that can be null in Trip and Leg. Also reorder the fields in Trip to be more in order of importance.

Issue

#6048

Unit tests

No tests

Bumping the serialization version id

The fields in Trip are reordered, but this should not change serialization.

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken requested a review from a team as a code owner October 11, 2024 12:09
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.93%. Comparing base (c5a988e) to head (eb0c0ee).
Report is 89 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...pentripplanner/model/plan/ScheduledTransitLeg.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6147      +/-   ##
=============================================
+ Coverage      69.90%   69.93%   +0.02%     
- Complexity     17709    17727      +18     
=============================================
  Files           1996     1996              
  Lines          75328    75401      +73     
  Branches        7713     7717       +4     
=============================================
+ Hits           52659    52729      +70     
- Misses         19992    19995       +3     
  Partials        2677     2677              

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

@habrahamsson-skanetrafiken
Copy link
Contributor Author

I rebased because of the maven modules change

@leonardehrenfried
Copy link
Member

Can you rebase again? The docs installation issue is fixed on dev-2.x.

@@ -178,7 +179,7 @@ public void validateLeg(
assertEquals(1, leg.getStreetNotes().size());
assertEquals(alert, leg.getStreetNotes().iterator().next().note.toString());
} else {
assertNull(leg.getStreetNotes());
Truth.assertThat(leg.getStreetNotes()).isEmpty();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Truth.assertThat(leg.getStreetNotes()).isEmpty();
assertThat(leg.getStreetNotes()).isEmpty();

Copy link
Member

Choose a reason for hiding this comment

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

Not applied

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now it is!

@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken merged commit db240e9 into opentripplanner:dev-2.x Oct 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants