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 Mass Enroll Filters #4542

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Aug 2, 2024

This PR adds a null check to correctly handle situations where no suitable faction is found.

Closes #4532, #4546

Refactored the filtering logic to improve readability and consistency by using `Objects.equals` for comparison and added a null check with `Objects::nonNull`.
@IllianiCBT IllianiCBT added Bug Personnel Personnel-related Issues labels Aug 2, 2024
@IllianiCBT IllianiCBT self-assigned this Aug 2, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.32%. Comparing base (b21f393) to head (1b488c6).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4542      +/-   ##
============================================
- Coverage     10.32%   10.32%   -0.01%     
  Complexity     5816     5816              
============================================
  Files           935      935              
  Lines        128788   128791       +3     
  Branches      18949    18949              
============================================
  Hits          13294    13294              
- Misses       114218   114221       +3     
  Partials       1276     1276              

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

@IllianiCBT IllianiCBT merged commit 877bcd9 into MegaMek:master Aug 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.50.0-SNAPSHOT] Recurring semi-random NPE when selecting multiple personnel and opening context menu.
3 participants