Package edu.umd.cs.findbugs.ba.type

Examples of edu.umd.cs.findbugs.ba.type.ExceptionSet


            Edge edge = i.next();
            if (!edge.isExceptionEdge()) {
                continue;
            }

            ExceptionSet exceptionSet = typeDataflow.getEdgeExceptionSet(edge);
            if (exceptionSet.isEmpty()) {
                // No exceptions are actually thrown on this edge,
                // so we can delete the edge.
                deletedEdgeSet.add(edge);
            } else {
                if (exceptionSet.isSingleton("java.lang.CloneNotSupportedException") && cfg.getMethodName().endsWith(".clone()")) {
                    String className = cfg.getMethodGen().getClassName();
                    if (Subtypes2.instanceOf(className, "java.lang.Cloneable")) {
                        deletedEdgeSet.add(edge);
                        continue;
                    }
                }
                // Some exceptions appear to be thrown on the edge.
                // Mark to indicate if any of the exceptions are checked,
                // and if any are explicit (checked or explicitly declared
                // or thrown unchecked).
                boolean someChecked = exceptionSet.containsCheckedExceptions();
                boolean someExplicit = exceptionSet.containsExplicitExceptions();

                int flags = 0;
                if (someChecked) {
                    flags |= CHECKED_EXCEPTIONS_FLAG;
                }
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.type.ExceptionSet

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.