Skip to content

Feature request: add an option to control which exceptions are ignored by the Resource Leak Checker #6218

@Calvin-L

Description

@Calvin-L

The Resource Leak Checker ignores control flow due to some exceptions.

Unfortunately the defaults make the RLC far too permissive for my use case. In particular, the RLC ignores RuntimeException by default, and as a result it has missed one or two real resource leaks.

There are lots of ways to address this, but I think the most general fix would be to add a checker option that takes a list of fully-qualified names of exception types to ignore, e.g.

-AresourceLeakIgnoredExceptionTypes=java.lang.Error,java.lang.NullPointerException

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions