RedundantExplicitCloseInspection created: IDEA-176630

This commit is contained in:
Roman Ivanov
2018-01-30 10:39:29 +07:00
parent 58444f64fa
commit d5d06483fe
7 changed files with 153 additions and 1 deletions
@@ -0,0 +1,16 @@
// "Remove redundant close" "true"
class MyAutoCloseable implements AutoCloseable {
@Override
void close() {
}
}
class RemoveTry {
public static void main(String[] args) {
try(MyAutoCloseable ac = new MyAutoCloseable()) {
System.out.println("asdasd");
}
}
}
@@ -0,0 +1,17 @@
// "Remove redundant close" "true"
class MyAutoCloseable implements AutoCloseable {
@Override
void close() {
}
}
class RemoveTry {
public static void main(String[] args) {
try(MyAutoCloseable ac = new MyAutoCloseable()) {
System.out.println("asdasd");
ac.close<caret>();
}
}
}