I've been running the Jackpot query transformations against the grizzly
framework source code and have found a couple transformation queries
kind of interesting.
I wondered what others thought.
There's one that's called "bad finally blocks" that's part of set of
"Effective Java" transformations. When I run this transformation query,
it complains about a couple places where we do a return inside a finally
block. For example:
finally {
if (exception != null || count == -1){
ctx.setAttribute(Context.THROWABLE,exception);
ctx.setKeyRegistrationState(
Context.KeyRegistrationState.CANCEL);
return false;
}
I looked in Joshua's Effective Java book and couldn't find a mention of
this being a bad practice, (unless I missed it).
Am I missing something obvious as to why this might be a bad practice?
charlie ...
--
Charlie Hunt
Java Performance Engineer
630.285.7708 x47708 (Internal)
<http://java.sun.com/docs/performance/>