/*
* @test /nodynamiccopyright/
* @bug 6911256 6964740 6965277 6967065
* @author Joseph D. Darcy
* @summary Check that -Xlint:twr warnings are generated as expected
* @compile/ref=TwrLint.out -Xlint:try,deprecation -XDrawDiagnostics TwrLint.java
*/
private static void test1() {
// r3 not referenced
}
}
@SuppressWarnings("try")
private static void test2() {
new DeprecatedAutoCloseable()) {
// r4 not referenced - but no warning is generated because of @SuppressWarnings
} catch(Exception e) {
;
}
}
/**
* The AutoCloseable method of a resource.
*/
public void close () {
return;
}
/**
* <em>Not</em> the AutoCloseable method of a resource.
*/
return;
}
}
public DeprecatedAutoCloseable(){super();}
public void close () {
return;
}
}