In Java, a try { ... } finally { ... } is executed somewhat unintuitively to me. As illustrated in another question, Does finally always execute in Java?, if you have a retu
the finally
construct is a facility provided by the JLS to handle a code prone to some exception. the developer can utilise this facility to ensure a graceful recovery from an exception. to use the finally
construct in the manner you've described doesn't make for a good practice. for that matter, it is never good to return
anything from the finally block.
so as you asekd, the "philosophy" is to handle any abrupt completion of code. if returning a certain value as part of handling such a state is required, that should be done within the catch
block.