Examples of ObligationPolicyDatabaseEntry


Examples of edu.umd.cs.findbugs.ba.obl.ObligationPolicyDatabaseEntry

                    continue;
                }
                if (methodHasCloseInName) {
                    // Method has "close" in its name.
                    // Assume that it deletes the obligation.
                    ObligationPolicyDatabaseEntry entry = database.addParameterDeletesObligationDatabaseEntry(xmethod,
                            obligationType, ObligationPolicyDatabaseEntryType.STRONG);

                } else {

                    /*
                     * // Interesting case: we have a parameter which is // an
                     * Obligation type, but no annotation or other indication //
                     * what is done by the method with the obligation. // We'll
                     * create a "weak" database entry deleting the //
                     * obligation. If strict checking is performed, // weak
                     * entries are ignored.
                     */
                    if (methodName.equals("<init>") || methodName.startsWith("access$") || xmethod.isStatic()
                            || methodName.toLowerCase().indexOf("close") >= 0
                            || xmethod.getSignature().toLowerCase().indexOf("Closeable") >= 0) {
                        ObligationPolicyDatabaseEntry entry = database.addParameterDeletesObligationDatabaseEntry(xmethod,
                                obligationType, ObligationPolicyDatabaseEntryType.WEAK);
                    }
                }
            }

View Full Code Here

Examples of edu.umd.cs.findbugs.ba.obl.ObligationPolicyDatabaseEntry

     * @param entryType
     *            type of entry (STRONG or WEAK)
     */
    private void addParameterDeletesObligationDatabaseEntry(XMethod xmethod, Obligation obligation,
            ObligationPolicyDatabaseEntryType entryType) {
        ObligationPolicyDatabaseEntry entry = database.addParameterDeletesObligationDatabaseEntry(xmethod, obligation, entryType);
        if (DEBUG_ANNOTATIONS) {
            System.out.println("Added entry: " + entry);
        }
    }
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.