Skip to content

chore: enable PMD UseTryWithResources rule#1286

Merged
joaodinissf merged 2 commits intodsldevkit:masterfrom
joaodinissf:chore/pmd-use-try-with-resources
Mar 13, 2026
Merged

chore: enable PMD UseTryWithResources rule#1286
joaodinissf merged 2 commits intodsldevkit:masterfrom
joaodinissf:chore/pmd-use-try-with-resources

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

@joaodinissf joaodinissf commented Mar 7, 2026

Summary

  • Convert manual try/finally blocks to try-with-resources where straightforward
  • Suppress with // NOPMD UseTryWithResources where conditional close logic prevents conversion
  • Remove unused LOGGER field in CheckExtensionGenerator (only usage was in removed finally block)
  • Remove the UseTryWithResources exclusion from the PMD ruleset

Test plan

  • mvn compile pmd:pmd pmd:check passes with no violations
  • CI build passes

🤖 Generated with Claude Code

joaodinissf and others added 2 commits March 7, 2026 17:00
Convert straightforward cases and suppress with NOPMD where
try-with-resources cannot be used (conditional close logic).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joaodinissf joaodinissf requested a review from rubenporras March 11, 2026 10:34
@joaodinissf joaodinissf marked this pull request as ready for review March 11, 2026 10:34
@joaodinissf joaodinissf enabled auto-merge (rebase) March 11, 2026 10:34
@rubenporras rubenporras disabled auto-merge March 13, 2026 06:49
@joaodinissf joaodinissf merged commit 1a58ab4 into dsldevkit:master Mar 13, 2026
3 checks passed
@joaodinissf joaodinissf deleted the chore/pmd-use-try-with-resources branch March 13, 2026 10:45
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.

2 participants