8000 Fixed Error On Loading Campaign That Predates Combat Teams by IllianiBird · Pull Request #6628 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed Error On Loading Campaign That Predates Combat Teams #6628

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

Merged
merged 1 commit into from
Apr 11, 2025

Conversation

IllianiBird
Copy link
Collaborator
  • Removed reflection-based Class.forName usage in generateInstanceFromXML for CombatTeam creation.
  • Replaced with direct instantiation of CombatTeam to remove runtime errors.

Dev Notes

This just fixes the loading of combat teams in campaigns that predate Combat Teams as a thing. The failure didn't actually cause any problems, but it did throw up all over the log so with us hoping 50.05 will make Milestone I figured it was worth tidying up.

- Removed reflection-based `Class.forName` usage in `generateInstanceFromXML` for `CombatTeam` creation.
- Replaced with direct instantiation of `CombatTeam` to remove runtime errors.
@IllianiBird IllianiBird added Bug Refactoring Severity: Low Issues described as low severity as per the new issue form labels Apr 11, 2025
@IllianiBird IllianiBird self-assigned this Apr 11, 2025
Copy link
codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 73 lines in your changes missing coverage. Please review.

Project coverage is 11.43%. Comparing base (2fef8ef) to head (093be85).
Report is 93 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/force/CombatTeam.java 0.00% 73 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6628   +/-   ##
=========================================
  Coverage     11.43%   11.43%           
- Complexity     6451     6453    +2     
=========================================
  Files          1086     1086           
  Lines        139459   139457    -2     
  Branches      21571    21571           
=========================================
+ Hits          15948    15949    +1     
+ Misses       121914   121911    -3     
  Partials       1597     1597           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IllianiBird IllianiBird merged commit 55baba0 into MegaMek:master Apr 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Refactoring Severity: Low Issues described as low severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0