diff -r a8437c34fdc7 -r 7f8794f9cc14 test/tools/javac/TryWithResources/TwrIntersection02.java --- a/test/tools/javac/TryWithResources/TwrIntersection02.java Mon Jan 24 16:38:56 2011 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * @test /nodynamiccopyright/ - * @bug 6911256 6964740 6965277 - * @author Maurizio Cimadamore - * @summary Check that resources of an intersection type forces union of exception types - * to be caught outside twr block - * @compile/fail/ref=TwrIntersection02.out -XDrawDiagnostics TwrIntersection02.java - */ - -class TwrIntersection02 { - - static class Exception1 extends Exception {} - static class Exception2 extends Exception {} - - - interface MyResource1 extends AutoCloseable { - void close() throws Exception1; - } - - interface MyResource2 extends AutoCloseable { - void close() throws Exception2; - } - - public void test1() throws Exception1 { - try(getX()) { - //do something - } - } - - public void test2() throws Exception2 { - try(getX()) { - //do something - } - } - - X getX() { return null; } -}