Only in 1.4.2(_0X), javac outputs the warning message when "return" is
in finally block.
The output message is as follows.
--->
goedel% javac FinallyTest.java
FinallyTest.java:9: warning: finally clause cannot complete normally
}
^
1 warning
goedel%
<---
REPRODUCE:
To compile the java code.
-->
public class FinallyTest {
public static void main(String[] args) {
try {
System.out.println("FinnalyTest");
return;
} finally {
System.out.println("FinnalyTest finally");
return;
}
}
}
<--
======================================================================