Skip to content

Fix SonarCloud: Sealed classes, deprecated API, ChatColor removal#2816

Merged
tastybento merged 2 commits intodevelopfrom
fix/sonar-pr6-annotations
Mar 3, 2026
Merged

Fix SonarCloud: Sealed classes, deprecated API, ChatColor removal#2816
tastybento merged 2 commits intodevelopfrom
fix/sonar-pr6-annotations

Conversation

@tastybento
Copy link
Member

Summary

  • Add null guard in IslandsManager.getIsland() for @NonNull params (S2637)
  • Add private constructor to UUIDFetcher utility class (S5993)
  • Apply sealed/final/non-sealed to 4 class hierarchies: AddonException, FlagChangeEvent, AddonBaseEvent, AbstractTeleportListener (S6355)
  • Add @SuppressWarnings for reflection in CommandsManager, FileLister, AddonsManager with justification comments (S3011)
  • Replace getDescription() with getPluginMeta() in 8 files (S1874)
  • Replace ChatColor with Adventure API / literal section-sign constants in Util.java (~12 occurrences), CatalogPanel.java (~4), IslandSetnameCommand.java (~2)

Risk

Medium-High — API changes, verify addon compatibility.

Test plan

  • ./gradlew clean test passes
  • Verify sealed class changes don't break external addon compilation
  • SonarCloud re-scan confirms reduction

🤖 Generated with Claude Code

tastybento and others added 2 commits March 1, 2026 21:47
…duction code

- Add null guard in IslandsManager.getIsland() for @nonnull params (S2637)
- Add private constructor to UUIDFetcher utility class (S5993)
- Apply sealed/final/non-sealed to AddonException, FlagChangeEvent,
  AddonBaseEvent, and AbstractTeleportListener hierarchies (S6355)
- Add @SuppressWarnings for reflection in CommandsManager, FileLister,
  AddonsManager with justification comments (S3011)
- Replace getDescription() with getPluginMeta() in 8 files (S1874)
- Replace ChatColor with Adventure API in Util.java, CatalogPanel.java,
  and IslandSetnameCommand.java (~19 occurrences)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

@tastybento tastybento merged commit 40496b1 into develop Mar 3, 2026
3 checks passed
@tastybento tastybento deleted the fix/sonar-pr6-annotations branch March 3, 2026 05:33
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