Skip to content

chore: enable PMD PreserveStackTrace rule#1285

Merged
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:chore/pmd-preserve-stack-trace
Apr 16, 2026
Merged

chore: enable PMD PreserveStackTrace rule#1285
joaodinissf merged 2 commits into
dsldevkit:masterfrom
joaodinissf:chore/pmd-preserve-stack-trace

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

@joaodinissf joaodinissf commented Mar 7, 2026

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 joaodinissf force-pushed the chore/pmd-preserve-stack-trace branch from 25cde9e to ccf5649 Compare April 4, 2026 11:42
joaodinissf and others added 2 commits April 7, 2026 00:11
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>
@joaodinissf joaodinissf force-pushed the chore/pmd-preserve-stack-trace branch from ccf5649 to db03cdf Compare April 6, 2026 22:12
@joaodinissf joaodinissf marked this pull request as ready for review April 7, 2026 18:27
@joaodinissf joaodinissf requested a review from rubenporras April 7, 2026 18:31
@joaodinissf joaodinissf enabled auto-merge (rebase) April 7, 2026 18:32
@joaodinissf joaodinissf merged commit 43928c2 into dsldevkit:master Apr 16, 2026
3 checks passed
@joaodinissf joaodinissf deleted the chore/pmd-preserve-stack-trace branch April 20, 2026 08:28
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