Skip to content

[java] Fix #6652: Support new-style instanceof (with pattern matching) in AvoidInstanceofChecksInCatchClause#6661

Merged
adangel merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6652-AvoidInstanceofChecksInCatchClause-false-negative-when-pattern-matching-instanceof
May 15, 2026
Merged

[java] Fix #6652: Support new-style instanceof (with pattern matching) in AvoidInstanceofChecksInCatchClause#6661
adangel merged 2 commits into
pmd:mainfrom
UncleOwen:issue-6652-AvoidInstanceofChecksInCatchClause-false-negative-when-pattern-matching-instanceof

Conversation

@UncleOwen
Copy link
Copy Markdown
Member

@UncleOwen UncleOwen commented May 12, 2026

Describe the PR

Support new-style instanceof (with pattern matching) in AvoidInstanceofChecksInCatchClause

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • [n/a] Added (in-code) documentation (if needed)

@pmd-actions-helper
Copy link
Copy Markdown
Contributor

pmd-actions-helper Bot commented May 12, 2026

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 2 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
There are 0 changed duplications, 0 new duplications and 0 removed duplications.
There are 0 changed CPD errors, 0 new CPD errors and 0 removed CPD errors.

Regression Tester Report

(comment created at 2026-05-15 11:49:28+00:00 for 6127ed7)

Support new-style instanceof in AvoidInstanceofChecksInCatchClause
@UncleOwen UncleOwen force-pushed the issue-6652-AvoidInstanceofChecksInCatchClause-false-negative-when-pattern-matching-instanceof branch from d91df33 to 44c669d Compare May 12, 2026 08:54
@UncleOwen UncleOwen changed the title Fix for #6652 [java] Fix #6652: Support new-style instanceof (with pattern matching) in AvoidInstanceofChecksInCatchClause May 12, 2026
@adangel adangel added this to the 7.25.0 milestone May 15, 2026
Copy link
Copy Markdown
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@adangel adangel merged commit 5ee3d11 into pmd:main May 15, 2026
13 checks passed
@UncleOwen UncleOwen deleted the issue-6652-AvoidInstanceofChecksInCatchClause-false-negative-when-pattern-matching-instanceof branch May 15, 2026 13:38
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.

[java] AvoidInstanceofChecksInCatchClause: False negative when pattern-matching instanceof

2 participants