I think it is because you have a return statement in your finally block, which allows the method to complete normally by returning a value. In other words, the new exception that's thrown in the catch block does not end up causing the method to complete abruptly.
Note that without this return statement (e.g., if the return type is changed to void), the new exception
is required to be declared or handled.
Interestingly, the new exception seems to be "lost." But
section 14.20 of the JLS states...
A try statement can throw an exception type E [if]... Some catch block of the try statement can throw E and either no finally block is present or the finally block can complete normally...
In this case, the catch block is throwing an exception and the finally block completes normally, so I would expect the try statement to be throwing the new exception.
A similar situation is detailed in Bruce Eckel's
Thinking in Java, under the section
Pitfall: the lost exception.
[ January 05, 2007: Message edited by: marc weber ]