I have a try block where database queries are attempted to be run and a finally block where database resources are released. If a value does not exist in the database I return null.
Is it a good idea to return in a try block?
Some example code:
    try {
        if (!jedis.exists(name)) {
            return null; // Is this a good idea?
        }
        // Do database related stuff...
    } catch (JedisConnectionException e) {
        // Fix any problems that happen
    } finally {
        // Return all objects to pools and clean up
    }
 
     
     
     
     
     
     
    