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

Fixed NPE in CamOps Mission Date Calculation #4674

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Aug 19, 2024

Previously, mission date calculation could throw a NullPointerException if there were no missions. Added a null check to ensure oldestMissionDate defaults to the current date if no missions exist. This prevents the exception.

Previously, mission date calculation could throw a NullPointerException if there were no missions. Added a null check to ensure `oldestMissionDate` defaults to the current date if no missions exist. This prevents the exception and ensures proper date calculation.
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.80%. Comparing base (7c8488d) to head (09472ec).
Report is 24 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #4674   +/-   ##
=========================================
  Coverage     10.79%   10.80%           
- Complexity     5710     5714    +4     
=========================================
  Files           950      950           
  Lines        131271   131277    +6     
  Branches      19135    19133    -2     
=========================================
+ Hits          14177    14189   +12     
+ Misses       115875   115863   -12     
- Partials       1219     1225    +6     

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

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM

@Sleet01 Sleet01 merged commit 9331e3d into MegaMek:master Aug 21, 2024
3 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.

3 participants