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

Fix issue 12823 (EditPanel#sortUnitsToRemove) illegal argument exception #12829

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

frigoref
Copy link
Member

@frigoref frigoref commented Aug 9, 2024

Fixes issue 12823 (2.5.22294: EditPanel#sortUnitsToRemove:931 - java.lang.IllegalArgumentException)

Notes to Reviewer

  • Issue caused by EditPanel.getRemovableUnitsOrder
  • includes cleanup in UnitAttachment

UnitAttachment.java
- set lombok @getter annotation for boolean attributes of pattern is* and can* having simple getters, i.e., get-methods just returning the attribute value

affected by renaming methods:
-AbstractPlaceDelegate.java
-AirBattle.java
-AiUtils.java
-BattleStepsTest.java
-CasualtyUtil.java
-DummyPlayerTest.java
-EndTurnDelegate.java
-FiringGroupSplitterAaTest.java
-FiringGroupSplitterGeneralTest.java
-GameParserTest.java
-InitializationDelegate.java
-MarkNoMovementLeftTest.java
-Matches.java
-MovePerformer.java
-MoveValidator.java
-NeighborGetter.java
-OffensiveGeneralRetreatTest.java
-ProCombatMoveAi.java
-ProNonCombatMoveAi.java
-ProPurchaseOption.java
-ProPurchaseOptionMap.java
-ProSortMoveOptionsUtils.java
-ProTechAi.java
-RemoveUnprotectedUnitsTest.java
-ScrambleLogic.java
-StrategicBombingRaidBattle.java
-TabbedProductionPanel.java
-TransportTracker.java
-UnitAbilityFactory.java
-UnitAttachment.java
-UnitAttachmentTest.java
-UnitComparator.java
-UnitImageFactory.java
-UnitInformation.java
-UnitSeparator.java
-UnitTypeComparator.java
-UnitTypeComparatorTest.java
-WeakAi.java
EditPanel.java
- avoid in method getRemovableUnitsOrder check on only one unit whether it is a transport capacity
- make attributes transient
- change selectedUnits.removeAll(units) to units.forEach(selectedUnits::remove)
- extract method getScrollPane

UnitAttachment.java
- new method isTransportCapacity() replacing != -1 comparisons
- comment typos
@frigoref frigoref changed the title Fix Iissue illegal argument exception Fix issue 12823 (EditPanel#sortUnitsToRemove) illegal argument exception Aug 9, 2024
@frigoref frigoref merged commit d15b9cd into triplea-game:master Aug 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant