triplea icon indicating copy to clipboard operation
triplea copied to clipboard

No return null (get territory)#1.1

Open frigoref opened this issue 5 months ago • 1 comments

Test.java

usage of method getTerritoryOrThrow instead of getTerritory DefaultAttachment.java

method getTerritoryOrThrow: replaces with getTerritoryOrThrowGameParseException new methods getTerritoryOrThrowGameParseException/getTerritoryOrThrowIllegalStateException: Throwing specific exception when no territory was found new method getTerritory: private method returning Optional to avoid returning null GameMap.java

method getTerritory: Renamed to getTerritoryOrNull method getTerritoryOrThrow: Documentation added methods getDistance: Parameter annotation NotNull added GameSelectorModel.java

method parseAndValidate: Return Optional instead of null method setGameData: Parameter annotation Nullable added GameTestUtils.java

method getTerritory: Replaced with getTerritoryOrThrow UnitTypeList.java

method getUnitTypes: Documentation updated Notes to Reviewer Follow-up PRs shall get to a state that getTerritory is no longer returning null. Replacement of PR #13584.

frigoref avatar Aug 10 '25 10:08 frigoref

Most content split up in PRs

  • #13703
  • #13704

frigoref avatar Oct 15 '25 20:10 frigoref