Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
darcy@609 | 1 | /* |
darcy@609 | 2 | * @test /nodynamiccopyright/ |
darcy@840 | 3 | * @bug 6911256 6964740 7013420 |
darcy@609 | 4 | * @author Joseph D. Darcy |
darcy@609 | 5 | * @summary Verify invalid TWR block is not accepted. |
darcy@609 | 6 | * @compile/fail -source 6 TwrOnNonResource.java |
darcy@609 | 7 | * @compile/fail/ref=TwrOnNonResource.out -XDrawDiagnostics TwrOnNonResource.java |
darcy@609 | 8 | */ |
darcy@609 | 9 | |
darcy@609 | 10 | class TwrOnNonResource { |
darcy@609 | 11 | public static void main(String... args) { |
darcy@609 | 12 | try(TwrOnNonResource aonr = new TwrOnNonResource()) { |
darcy@609 | 13 | System.out.println(aonr.toString()); |
darcy@609 | 14 | } |
darcy@609 | 15 | try(TwrOnNonResource aonr = new TwrOnNonResource()) { |
darcy@609 | 16 | System.out.println(aonr.toString()); |
darcy@609 | 17 | } finally {;} |
darcy@609 | 18 | try(TwrOnNonResource aonr = new TwrOnNonResource()) { |
darcy@609 | 19 | System.out.println(aonr.toString()); |
darcy@609 | 20 | } catch (Exception e) {;} |
darcy@609 | 21 | } |
darcy@609 | 22 | |
darcy@609 | 23 | /* |
darcy@609 | 24 | * A close method, but the class is <em>not</em> Closeable or |
darcy@609 | 25 | * AutoCloseable. |
darcy@609 | 26 | */ |
darcy@609 | 27 | public void close() { |
darcy@609 | 28 | throw new AssertionError("I'm not Closable!"); |
darcy@609 | 29 | } |
darcy@609 | 30 | } |