Reports AutoCloseable instances which are not used in a try-with-resources statement, also known as Automatic Resource Management. This means that the open resource before/in try, close in finally style which was used before try-with-resources was available is also reported. This inspection is meant to replace all opened but not safely closed inspections when developing in Java 7 and higher.

Use the first table below to specify which AutoCloseable subclasses should be ignored by this inspection. Specify AutoCloseable subclasses here which do not need to be closed.

Note: This inspection will still warn on streams returned from the java.nio.file.Files methods lines(), walk(), list() and find(), even when java.util.stream.Stream is specified to be ignored in this table. These streams contain an associated I/O resource that needs to be closed.

Use the second table below to specify which methods returning AutoCloseable will be ignored when called.

Use the first checkbox below to ignore an AutoCloseable if it the result of a method call. When enabled, the results of factory methods will also be ignored.

Use the second checkbox below to specify that the inspection should not warn if an AutoCloseable instance is passed as a method call argument. If enabled the inspection assumes the resource is closed in the called method. Method calls inside a finally block with close in the name and an AutoCloseable argument will not be ignored.