-
Notifications
You must be signed in to change notification settings - Fork 437
See which other JDK subtypes of AutoCloseable should be @MustCall("close") #6354
Copy link
Copy link
Open
Labels
ResourceLeakCheckergood first issueA beginner-friendly place to start contributing to the Checker FrameworkA beginner-friendly place to start contributing to the Checker Framework
Milestone
Description
Right now, our JDK model does not annotate AutoCloseable as @MustCall("close"):
It'd be nice if we could annotate it as @MustCall("close") and then annotate those AutoCloseable types that do not manage a resource as @MustCall(""), but it seems this causes issues with excessive warnings. Perhaps we could fix this? If not, we should at some point look through the list of JDK types implementing AutoCloseable and see which other ones should be @MustCall("close"):
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/AutoCloseable.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ResourceLeakCheckergood first issueA beginner-friendly place to start contributing to the Checker FrameworkA beginner-friendly place to start contributing to the Checker Framework