Redundant 'close()'

Last modified: 03 December 2024

Reports unnecessary calls to close() at the end of a try-with-resources block and suggests removing them.

Example:

After the quick-fix is applied:

New in 2018.1