2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-15 08:28:43 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4821353
|
|
|
|
* @summary new warning "finally cannot complete normally" should not be enabled by default
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-05-15 08:28:43 +00:00
|
|
|
* @compile/fail/ref=FinallyWarn.out -XDrawDiagnostics -Xlint:finally -Werror FinallyWarn.java
|
2007-12-01 00:00:00 +00:00
|
|
|
* @compile -Werror FinallyWarn.java
|
|
|
|
*/
|
|
|
|
|
|
|
|
class FinallyWarn {
|
|
|
|
void f() {
|
|
|
|
try {
|
|
|
|
} finally {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|