Package edu.umd.cs.findbugs.ba.npe

Examples of edu.umd.cs.findbugs.ba.npe.ParameterNullnessPropertyDatabase


        SignatureParser sigParser = new SignatureParser(inv.getSignature(constantPool));
        int numParams = sigParser.getNumParameters();
        if (numParams == 0 || !sigParser.hasReferenceParameters()) {
            return Collections.emptySet();
        }
        ParameterNullnessPropertyDatabase database = AnalysisContext.currentAnalysisContext()
                .getUnconditionalDerefParamDatabase();
        if (database == null) {
            if (DEBUG_CHECK_CALLS) {
                System.out.println("no database!");
            }
            return Collections.emptySet();
        }

        TypeFrame typeFrame = typeDataflow.getFactAtLocation(location);
        if (!typeFrame.isValid()) {
            if (DEBUG_CHECK_CALLS) {
                System.out.println("invalid type frame!");
            }
            return Collections.emptySet();
        }

        try {
            Set<XMethod> targetSet = Hierarchy2.resolveMethodCallTargets(inv, typeFrame, constantPool);

            if (targetSet.isEmpty()) {
                return Collections.emptySet();
            }

            if (DEBUG_CHECK_CALLS) {
                System.out.println("target set size: " + targetSet.size());
            }
            // Compute the intersection of all properties
            ParameterProperty derefParamSet = null;
            for (XMethod target : targetSet) {
                if (target.isStub()) {
                    continue;
                }
                if (DEBUG_CHECK_CALLS) {
                    System.out.print("Checking: " + target + ": ");
                }

                ParameterProperty targetDerefParamSet = database.getProperty(target.getMethodDescriptor());
                if (targetDerefParamSet == null) {
                    // Hmm...no information for this target.
                    // assume it doesn't dereference anything
                    if (DEBUG_CHECK_CALLS) {
                        System.out.println("==> no information, assume no guaranteed dereferences");
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.ba.npe.ParameterNullnessPropertyDatabase

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.