Examples of addOptionalAnnotation()


Examples of edu.umd.cs.findbugs.BugInstance.addOptionalAnnotation()

            }
        }
        if (storedField != null) {
            bugInstance.addField(storedField).describe("FIELD_STORED");
        }
        bugInstance.addOptionalAnnotation(variableAnnotation);
        if (variableAnnotation instanceof FieldAnnotation) {
            bugInstance.describe("FIELD_CONTAINS_VALUE");
        }

        addPropertiesForDereferenceLocations(propertySet, derefLocationSet, false);
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addOptionalAnnotation()

                    Set<Location> unconditionalDerefLocationSet = unconditionalDeref.getUnconditionalDerefLocationSet(value);

                    BugInstance bug;
                    if (unconditionalDerefLocationSet.size() > 1) {
                        bug = new BugInstance(this, "NP_GUARANTEED_DEREF", NORMAL_PRIORITY).addClassAndMethod(this);
                        bug.addOptionalAnnotation(variableAnnotation);
                        bug.addSourceLine(tested).describe("SOURCE_LINE_KNOWN_NULL");
                        for (Location dereferenced : unconditionalDerefLocationSet) {
                            bug.addSourceLine(getClassContext(), getMethod(), dereferenced).describe("SOURCE_LINE_DEREF");
                        }
View Full Code Here

Examples of edu.umd.cs.findbugs.BugInstance.addOptionalAnnotation()

                            bug.addSourceLine(getClassContext(), getMethod(), dereferenced).describe("SOURCE_LINE_DEREF");
                        }

                    } else {
                        bug = new BugInstance(this, "NP_NULL_ON_SOME_PATH", NORMAL_PRIORITY).addClassAndMethod(this);
                        bug.addOptionalAnnotation(variableAnnotation);
                        for (Location dereferenced : unconditionalDerefLocationSet) {
                            bug.addSourceLine(getClassContext(), getMethod(), dereferenced).describe("SOURCE_LINE_DEREF");
                        }

                        bug.addSourceLine(tested).describe("SOURCE_LINE_KNOWN_NULL");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.