I have a variable that is not supposed to change its value after it\'s been initialized, so I want to define it as a final variable.
the problem is that the variable
Can you try assigning it in both the catch and finally blocks? Like so:
Connection connTemp = null; final Connection conn; try { connTemp = getConn(prefix); } catch (Exception e) { throw new DbHelperException("error opening connection", e); } finally { closeConnection(conn); } conn = connTemp;