change signature: don't unwrap try-with-resources with non-empty resource list (IDEA-202731)

This commit is contained in:
Anna.Kozlova
2018-11-23 10:43:47 +01:00
parent 6cdf4b195f
commit df9d11e89d
4 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
class Scratch {
static class C implements AutoCloseable {
public void close() {}
}
public static void main(String[] args) throws Exception {
try (C c = new C()) {
foo();
}
}
static void f<caret>oo() throws Exception { }
}

View File

@@ -0,0 +1,14 @@
class Scratch {
static class C implements AutoCloseable {
public void close() {}
}
public static void main(String[] args) throws Exception {
try (C c = new C()) {
foo();
}
}
static void foo() { }
}