Package edu.umd.cs.findbugs.ba

Examples of edu.umd.cs.findbugs.ba.PruneInfeasibleExceptionEdges$MarkedEdge


        if (PRUNE_INFEASIBLE_EXCEPTION_EDGES && !cfg.isFlagSet(CFG.PRUNED_INFEASIBLE_EXCEPTIONS)) {
            try {
                TypeDataflow typeDataflow = analysisCache.getMethodAnalysis(TypeDataflow.class, descriptor);
                // Exception edge pruning based on ExceptionSets.
                // Note: this is quite slow.
                PruneInfeasibleExceptionEdges pruner = new PruneInfeasibleExceptionEdges(cfg, methodGen, typeDataflow);
                pruner.execute();
                changed = changed || pruner.wasCFGModified();
            } catch (MissingClassException e) {
                AnalysisContext.currentAnalysisContext().getLookupFailureCallback()
                .reportMissingClass(e.getClassNotFoundException());
            } catch (DataflowAnalysisException e) {
                AnalysisContext.currentAnalysisContext().getLookupFailureCallback()
                .logError("unable to extract type analysis", e);
            } catch (ClassNotFoundException e) {
                AnalysisContext.currentAnalysisContext().getLookupFailureCallback().reportMissingClass(e);
            }
        }
        cfg.setFlag(CFG.PRUNED_INFEASIBLE_EXCEPTIONS);

        final boolean PRUNE_UNCONDITIONAL_EXCEPTION_THROWER_EDGES = !AnalysisContext.currentAnalysisContext().getBoolProperty(
                AnalysisFeatures.CONSERVE_SPACE);

        if (PRUNE_UNCONDITIONAL_EXCEPTION_THROWER_EDGES && !cfg.isFlagSet(CFG.PRUNED_UNCONDITIONAL_THROWERS)) {
            try {
                JavaClass jclass = analysisCache.getClassAnalysis(JavaClass.class, descriptor.getClassDescriptor());
                Method method = analysisCache.getMethodAnalysis(Method.class, descriptor);
                ConstantPoolGen cpg = analysisCache.getClassAnalysis(ConstantPoolGen.class, descriptor.getClassDescriptor());
                TypeDataflow typeDataflow = analysisCache.getMethodAnalysis(TypeDataflow.class, descriptor);

                PruneUnconditionalExceptionThrowerEdges pruner = new PruneUnconditionalExceptionThrowerEdges(jclass, method,
                        methodGen, cfg, cpg, typeDataflow, AnalysisContext.currentAnalysisContext());
                pruner.execute();
                if (pruner.wasCFGModified()) {
                    changed = true;

                }
            } catch (DataflowAnalysisException e) {
                AnalysisContext.logError("Error pruning normal return edges for unconditionally throwing methods for "
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.PruneInfeasibleExceptionEdges$MarkedEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.