typetools / typetools/checker-framework

Resource Leak Checker: handling `static @Owning` fields

Open
#5,168 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ResourceLeakChecker
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

Sometimes, programmers use static @Owning fields, especially in legacy code.
It would be nice to have a flag to suppress all warnings related to static @Owning fields, or to respect the static annotation so that a warning can be suppressed only at the field definition.
A programmer may not care about resources leaked by static @Owning fields, for these reasons:

  • There are a limited number of such fields, and a user may find a small number of resource leaks acceptable.
  • Oftentimes those fields are used throughout execution, until the program exits; there is no good place to dispose of them.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the Resource Leak Checker and its handling of static @Owning fields, then clarify whether the intended result is a global suppression flag or suppression at each field definition. Done means the selected behavior is implemented and covered by tests for static @Owning fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.