Skip to content

[java] CloseResource: Allow to ignore managed resources#6437

Merged
adangel merged 1 commit intopmd:mainfrom
gcuisinier:java/closeresourcerules-whitelistmanaged
Feb 23, 2026
Merged

[java] CloseResource: Allow to ignore managed resources#6437
adangel merged 1 commit intopmd:mainfrom
gcuisinier:java/closeresourcerules-whitelistmanaged

Conversation

@gcuisinier
Copy link
Contributor

Allow to configure method that will consider created ressource as "managed" and that should not be manually closed.

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)
  • Added (in-code) documentation (if needed)

@gcuisinier gcuisinier force-pushed the java/closeresourcerules-whitelistmanaged branch from b9b136a to 759f59f Compare February 3, 2026 10:11
@adangel adangel changed the title [java] CloseResource : Allow to ignore managed resources [java] CloseResource: Allow to ignore managed resources Feb 22, 2026
@adangel adangel added this to the 7.22.0 milestone Feb 22, 2026
@pmd-actions-helper
Copy link
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 3 violations, 15 errors and 8 configuration errors.

Regression Tester Report

(comment created at 2026-02-22 17:39:50+00:00 for 759f59f)

Copy link
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, looks good!

adangel added a commit that referenced this pull request Feb 23, 2026
@adangel adangel merged commit 759f59f into pmd:main Feb 23, 2026
12 checks passed
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] CloseResource: Allow to ignore managed resources

2 participants