Skip to content

Fix SonarCloud: Production code quality improvements#2815

Merged
tastybento merged 3 commits intodevelopfrom
fix/sonar-pr5-prod-quality
Mar 3, 2026
Merged

Fix SonarCloud: Production code quality improvements#2815
tastybento merged 3 commits intodevelopfrom
fix/sonar-pr5-prod-quality

Conversation

@tastybento
Copy link
Member

Summary

  • Replace File.delete() with Files.delete() / Files.deleteIfExists() in AdminPurgeRegionsCommand (S4042)
  • Merge identical branches in EntityInteractListener, Island, AdminPurgeRegionsCommand (S1871)
  • Replace Guava ImmutableSet with Set.copyOf() / Set.of() in Settings, Island (S4738)
  • Replace generic exceptions with specific ones in GitHubWebAPI (S112)
  • Fix naming conventions across PhysicalInteractionListener, FlagListener, PVPListener, InvincibleVisitorsListener, RanksManager (S116/S117/S100/S3008)
  • Extract shared helper methods in Island.java (S4144)

Risk

Medium — touches production logic, all affected tests verified.

Test plan

  • ./gradlew clean test passes
  • SonarCloud re-scan confirms reduction

🤖 Generated with Claude Code

tastybento and others added 3 commits March 1, 2026 21:17
- S4042: Replace File.delete() with Files.delete()/deleteIfExists()
- S1871: Merge identical branches in EntityInteractListener, AdminPurgeRegionsCommand
- S4738: Replace Guava ImmutableSet/ImmutableList with Java Set.copyOf/List.copyOf
- S112: Replace generic RuntimeException with specific exceptions in GitHubWebAPI
- S117/S100: Fix naming conventions in PhysicalInteractionListener, FlagListener
- S3008/S116: Make RanksManager.ranks static final, use interface types
- S4144: Extract shared helper methods in Island.java

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflict in AdminPurgeRegionsCommand.java: keep Files.deleteIfExists()
(S4042 fix) over old File.delete() pattern.

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

sonarqubecloud bot commented Mar 3, 2026

@tastybento tastybento merged commit 8a1df4e into develop Mar 3, 2026
3 checks passed
@tastybento tastybento deleted the fix/sonar-pr5-prod-quality branch March 3, 2026 05:27
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