Skip to content

Conversation

@kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Nov 28, 2025

Identify the Bug or Feature request

Fixes NPE related to #5643

Description of the Change

Changes the StatSheetProperties constructor to handle a null location and replace it with the default of StatSheetLocation#BOTTOM_LEFT. The various callers that did this same replacement have been updated to just pass null.

I also noticed that anywhere we need a StatSheet's ID, we would conjure up a new StatSheetManager to build the ID. That seemed odd, so I also moved that responsibility to the StatSheet record itself, streamlining callers and eliminating a few redundant methods from StatSheetManager.

Possible Drawbacks

None

Documentation Notes

N/A

Release Notes

N/A


This change is Reviewable

The location is not permitted to be `null`, so instead pass the default of `BOTTOM_LEFT` as in other places.
There were several callers that had to check for a `null` location and replace it with the default of
`BOTTOM_LEFT`. That is no longer necessary since the `StatSheetProperties` constructor will do so.
THere were several places where `StatSheetManager` instances had to be conjured out of nowhere just to append the
namespace and name into an ID. This is no longer necessary as `StatSheet#id()` will do the same without involving a
`StatSheetManager`.
@kwvanderlinde kwvanderlinde self-assigned this Nov 28, 2025
@kwvanderlinde kwvanderlinde moved this from Todo to Awaiting-Review in MapTool 1.19 Nov 28, 2025
@kwvanderlinde kwvanderlinde linked an issue Nov 28, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this from Awaiting-Review to To-Be-Merged in MapTool 1.19 Nov 30, 2025
@cwisniew cwisniew added this pull request to the merge queue Nov 30, 2025
Merged via the queue into RPTools:develop with commit e2a4750 Nov 30, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from To-Be-Merged to Merged in MapTool 1.19 Nov 30, 2025
@kwvanderlinde kwvanderlinde deleted the bugfix/5643-null-stat-sheet-location branch December 1, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

[Feature]: Set a token to have no stat-sheet

2 participants