This code is part of an application that reads from and writes to an ODBC connected database. It creates a record in the database and then checks if a record has been succes
You have two return paths in your code, the second of which is unreachable because of the first. The last statement in your try
block return returnValue == 1;
provides your normal return, so you can never reach the return false;
at the end of the method block.
FWIW, order of exection related to the finally
block is: the expression supplying the return value in the try block will be evaluated first, then the finally block will be executed, and then the calculated expression value will be returned (inside the try block).
Regarding flow on exception... without a catch
, the finally
will be executed upon exception before the exception is then rethrown out of the method; there is no "return" path.