Skip to content

[Misc] Remove unused code and add missing @Override annotations (SonarCloud)#5827

Open
vmassol wants to merge 1 commit into
masterfrom
claude/vigilant-dirac-n79ow9
Open

[Misc] Remove unused code and add missing @Override annotations (SonarCloud)#5827
vmassol wants to merge 1 commit into
masterfrom
claude/vigilant-dirac-n79ow9

Conversation

@vmassol

@vmassol vmassol commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

Mechanical, behaviour-preserving cleanup of several SonarCloud rules across 24 modules (40 issues fixed in 27 files):

  • java:S1068 — remove unused private fields
  • java:S1481 / java:S1854 — remove unused local variables and their dead-store assignments (these fire as a pair on the same line)
  • java:S1161 — add missing @Override annotations

Details

  • Unused private fields (S1068): the field declaration (and its javadoc, if any) was removed. Where removal orphaned an import, that import was removed too (DocumentReference, RenderingContext, Logger/LoggerFactory, InternetAddress).
  • Unused locals / dead stores (S1481 + S1854): when the right-hand side was a pure expression the whole declaration was removed; when it had a side effect that must be kept (e.g. newXObject(...), assertThrows(..., ...)), only the Type name = prefix was stripped so the call remains a bare statement.
  • Missing @Override (S1161): the annotation was added above the flagged method signatures. Purely additive.

No functional/behavioural change: unused code removal and annotation additions only.

A handful of remaining S1068 issues were intentionally left out because they are write-only fields assigned in multiple places (removing the declaration alone would not compile) — those need a non-mechanical change and are out of scope here.

Test plan

  • mvn clean install -Plegacy,snapshot -DskipTests across all 24 affected modules in one reactor — BUILD SUCCESS. Test sources still compile and Checkstyle passes; the changes are behaviour-preserving.

Generated by Claude Code

…rCloud)

Mechanical, behaviour-preserving cleanup of several SonarCloud rules across
24 modules: unused private fields (java:S1068), unused local variables and
dead stores (java:S1481 / java:S1854), and missing @OverRide annotations
(java:S1161).

Co-Authored-By: Vincent Massol <vincent@massol.net>
@vmassol vmassol added the llm-agent To be used for PRs created autonomously by LLM agents. label Jul 13, 2026 — with Claude
@vmassol vmassol self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-agent To be used for PRs created autonomously by LLM agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant