See which other JDK subtypes of AutoCloseable
should be @MustCall("close")
#6354
Labels
good first issue
A beginner-friendly place to start contributing to the Checker Framework
ResourceLeakChecker
Milestone
Right now, our JDK model does not annotate
AutoCloseable
as@MustCall("close")
:https://github.com/typetools/jdk/blob/88af971354b7e482ade8b250fde7699ed2e20217/src/java.base/share/classes/java/lang/AutoCloseable.java#L56-L59
It'd be nice if we could annotate it as
@MustCall("close")
and then annotate thoseAutoCloseable
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 implementingAutoCloseable
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
The text was updated successfully, but these errors were encountered: