Skip to content

chore: enable PMD PreserveStackTrace rule#1285

Draft
joaodinissf wants to merge 2 commits intodsldevkit:masterfrom
joaodinissf:chore/pmd-preserve-stack-trace
Draft

chore: enable PMD PreserveStackTrace rule#1285
joaodinissf wants to merge 2 commits intodsldevkit:masterfrom
joaodinissf:chore/pmd-preserve-stack-trace

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

Summary

  • Pass caught exceptions as cause to newly thrown exceptions where missing
  • Replace AssertionFailedException (no cause constructor) with IllegalStateException in test utilities
  • Suppress with // NOPMD PreserveStackTrace where unwrapping is intentional (e.g. WrappedException.exception(), cancellation signals)
  • Remove the PreserveStackTrace 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 16:39
Pass the caught exception as cause to newly thrown exceptions, or
suppress with NOPMD where the unwrapping is intentional.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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