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

Example:


  try(MyAutoCloseable ac = new MyAutoCloseable()) {
    foo();
    ac.close();
  }

After the quick-fix is applied:


  try(MyAutoCloseable ac = new MyAutoCloseable()) {
    foo();
  }
New in 2018.1