Skip to content

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

Closed

Description

@gcuisinier

Rule: CloseResource

Is your feature request related to a problem? Please describe.
When using Writer/Reader from HttpServletRequest/Response, the underlying object should be managed by the Servlet Server and so we should not explicitly close them.

Maybe it can be the case for other managed objects.

Describe the solution you'd like
Allow to setup an array of whitelisted method to create Resource, that will not need to check if it has been closed.

Describe alternatives you've considered
None
Additional context
None

Activity

  1. added
    an:enhancement
    on Feb 3, 2026
  2. changed the title [-]CloseResource : Allow to ignore managed resources[/-] [+][java] CloseResource : Allow to ignore managed resources[/+] on Feb 3, 2026
  3. changed the title [-][java] CloseResource : Allow to ignore managed resources[/-] [+][java] CloseResource: Allow to ignore managed resources[/+] on Feb 22, 2026
  4. added this to the 7.22.0 milestone on Feb 22, 2026
  5. added a commit that references this issue on Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions