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);
}
}
}