Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit ownership of static fields of a resource type #2281

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

stephan-herrmann
Copy link
Contributor

fixes #2161

  • warn about static resource fields (if annotations are enabled)
  • no warning on any field of whitelisted type
  • warn on field initialization in static block, but not at field
  • resolve left-over from bug 552521: no warnings in unreachable code
  • make new problems from PR Enhance resource leak analysis with additional annotation(s) #1716 suppressable (token = "resource")

Tests:

  • in annotation mode annotate some fields as @Owning for equal result

fixes eclipse-jdt#2161
+ warn about static resource fields (if annotations are enabled)
+ no warning on any field of whitelisted type
+ warn on field initialization in static block, but not at field
+ resolve left-over from bug 552521: no warnings in unreachable code
+ make new problems from PR eclipse-jdt#1716 suppressable (token = "resource")
Tests:
+ in annotation mode annotate some fields as @owning for equal result
@stephan-herrmann stephan-herrmann merged commit 2ed6416 into eclipse-jdt:master Apr 4, 2024
9 checks passed
@stephan-herrmann stephan-herrmann deleted the issue2161 branch April 4, 2024 19:27
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.

Revisit ownership of static fields of a resource type
1 participant