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

Implement hashCode for Money class #5801

Merged

Conversation

leonardehrenfried
Copy link
Member

@leonardehrenfried leonardehrenfried commented Apr 12, 2024

Summary

I found a rather embarrassing bug where the vehicle parking updater would randomly add and remove parking lots. This was due to the fact that equals and hashCode in VehicleParking were not symetric.

I traced it down to Money not having implemented hashCode. 😳

Unit tests

✔️

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.86%. Comparing base (ad49e64) to head (bbbe74c).
Report is 11 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #5801   +/-   ##
==========================================
  Coverage      67.86%   67.86%           
- Complexity     16547    16548    +1     
==========================================
  Files           1908     1908           
  Lines          72339    72340    +1     
  Branches        7442     7442           
==========================================
+ Hits           49094    49095    +1     
- Misses         20723    20724    +1     
+ Partials        2522     2521    -1     

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

@leonardehrenfried leonardehrenfried merged commit 257ca44 into opentripplanner:dev-2.x Apr 16, 2024
5 checks passed
@leonardehrenfried leonardehrenfried deleted the fix-hashcode branch April 16, 2024 10:06
@t2gran t2gran added this to the 2.6 (next release) milestone May 7, 2024
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