/** * looks to see if any try/catch block exists inside this finally block, that wrap the current pc. This is a lax check as the try catch block may not catch * exceptions that are thrown, but doing so would be prohibitively slow. But it should catch some problems. * * @param fBlockInfo * the finally block the pc is currently in * * @return if all exceptions are caught inside this finally block */ private boolean catchBlockInFinally(FinallyBlockInfo fBlockInfo) { CodeException[] catchExceptions = getCode().getExceptionTable(); if (CollectionUtils.isEmpty(catchExceptions)) { return false; } int pc = getPC(); for (CodeException ex : catchExceptions) { if ((ex.getStartPC() <= pc) && (ex.getEndPC() >= pc) && (ex.getStartPC() >= fBlockInfo.startPC)) { return true; } } return false; }
/** * looks to see if any try/catch block exists inside this finally block, that wrap the current pc. This is a lax check as the try catch block may not catch * exceptions that are thrown, but doing so would be prohibitively slow. But it should catch some problems. * * @param fBlockInfo * the finally block the pc is currently in * * @return if all exceptions are caught inside this finally block */ private boolean catchBlockInFinally(FinallyBlockInfo fBlockInfo) { CodeException[] catchExceptions = getCode().getExceptionTable(); if (CollectionUtils.isEmpty(catchExceptions)) { return false; } int pc = getPC(); for (CodeException ex : catchExceptions) { if ((ex.getStartPC() <= pc) && (ex.getEndPC() >= pc) && (ex.getStartPC() >= fBlockInfo.startPC)) { return true; } } return false; }