printStat(catchStmt); if (tree.getFinallyBlock() != null) { print(" finally "); printStat(tree.getFinallyBlock());
if (tryNode.getFinallyBlock() != null) { collectExecutionPaths(tryNode.getFinallyBlock(), allExecutionPaths, currentPathForksList, activeBreaks);
private static void analyzeTry(SourceContext context, JCTree.JCTry tryExpr) throws IOException { JCTree.JCBlock block = tryExpr.getBlock(); List<JCTree> resources = tryExpr.getResources(); List<JCTree.JCCatch> catches = tryExpr.getCatches(); JCTree.JCBlock lyBlock = tryExpr.getFinallyBlock(); if (nonNull(resources)) { for (JCTree resource : resources) { analyzeParsedTree(context, resource); } } analyzeParsedTree(context, block); if (nonNull(catches)) { for (JCTree.JCCatch jcCatch : catches) { JCTree.JCVariableDecl parameter = jcCatch.getParameter(); analyzeParsedTree(context, parameter); JCTree.JCBlock catchBlock = jcCatch.getBlock(); analyzeParsedTree(context, catchBlock); } } analyzeParsedTree(context, lyBlock); }
printStat(catchStmt); if (tree.getFinallyBlock() != null) { print(" finally "); printStat(tree.getFinallyBlock());
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }
@Override public void visitTry(JCTry node) { Try t = new Try(); t.rawBody(toTree(node.getBlock())); t.rawFinally(toTree(node.getFinallyBlock())); fillList(node.getCatches(), t.rawCatches()); set(node, t); }