Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

Fix build regressions, runtime NPE, and clean up control flow - #147

#147
Open
scurth wants to merge 13 commits into
FreeCol:sf-auto-mergeFreeCol/freecol:sf-auto-mergefrom
scurth:masterscurth/freecol:masterCopy head branch name to clipboard
Open

Fix build regressions, runtime NPE, and clean up control flow#147
scurth wants to merge 13 commits into
FreeCol:sf-auto-mergeFreeCol/freecol:sf-auto-mergefrom
scurth:masterscurth/freecol:masterCopy head branch name to clipboard

Conversation

@scurth

@scurth scurth commented Dec 26, 2025

Copy link
Copy Markdown

Changes

  • Disambiguated java.util.Map vs model Map in mapviewer/model code.
  • Restored required public session completion.
  • Added null guards for Unit ethnicity during GUI render.
  • Logging: reflectively use LogRecord thread id to avoid deprecation warnings.
  • Suppressed deprecation in locale parsing to keep legacy behavior.

logger.info(" tiling isometric base tile.");
logger.info("");
logger.info("Two results are produced by this tool: \"generated.png\" and \"generated-rotated.png\"");
logger.info("The best one to use depends on the texture.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a command-line util - so writing the usage help to the log is wrong. I'm guessing you have applied suggested fixes from the IDE without verifying.

@@ -107,7 +107,7 @@ public ChangeSet ready(ServerPlayer serverPlayer, boolean ready) {
* @return A {@code ChangeSet} encapsulating this action.
*/
public ChangeSet requestLaunch(ServerPlayer serverPlayer) {
logger.info("Launching for " + serverPlayer);
if (logger.isLoggable(Level.INFO)) logger.info("Launching for " + serverPlayer);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If-tests like these are often suggested by tools like PMD, but is more complicated to read - and for what?The cost of the string construction is insignificant.

@stiangre

Copy link
Copy Markdown
Contributor

First of all, it's really nice that you want to contribute to the FreeCol code!

There are too many changes that are unrelated in the same Pull request (PR). You need to create separate PRs for each type of change. In addition, you need to state how your changes have been tested.

There are a lot of good changes in the PR, but it's simply too large and includes changes we do not want to merge. Please do make separate PRs if you have the time to do so.

@scurth

scurth commented Aug 23, 2026

Copy link
Copy Markdown
Author

Thanks a lot for checking this, indeed way too large a PR. I used my
free time during the Christmas break last year and was already afraid
it wasn't really suitable for review.

I just created a well-scoped PoC and submitted PR #172 to showcase the
power of the wide-events idea for our logging. If you like it, I'm
happy to continue and harmonize the rest of the logging incrementally
in the same style.

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.