Thu, 07 Jun 2012 20:30:57 -0700
7170079: Adjustments to build-infra makefiles
Reviewed-by: ohair, ohrstrom, ihse, jonas
Contributed-by: jonas <jonas.oreland@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>
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 | } |