CenturyLinkCloud / mdw

https://centurylinkcloud.github.io/mdw/
MIT License
46 stars 10 forks source link

SQLException can be swallowed in ProcessEngineDriver.processEvents() #759

Closed donaldoakes closed 4 years ago

donaldoakes commented 4 years ago

This catch block has a logic flaw that causes it to swallow SQLExceptions that are not "Failed to load process instance":

    try {
        transaction = edbao.startTransaction();
        procInst = edbao.getProcessInstance(procInstId);
    }
    catch (SQLException ex) {
        if (("Failed to load process instance: " + procInstId).equals(ex.getMessage())) {
            if (ApplicationContext.isDevelopment()) {
                logger.severe("Unable to load process instance id=" + procInstId + ".  Was this instance deleted?");
                return;
            } else {
                throw ex;
            }
        }
    }