String sig = signatureIterator.next();
Collection<ClassDescriptor> annotations = invokedMethod.getParameterAnnotationDescriptors(i);
if (annotations.contains(WILL_CLOSE) || sig.equals("Ljava/io/Closeable;") || methodName.startsWith("close")) {
// closing this value
if (factAtLocation == null) {
factAtLocation = typeDataflow.getFactAtLocation( new Location(handle, block));
}
Type argumentType = factAtLocation.getArgument(inv, cpg, i, sigParser);
if (argumentType instanceof ObjectType) {
Obligation obligation = database.getFactory().getObligationByType((ObjectType) argumentType);
if (obligation != null) {
actionList.add(new ObligationPolicyDatabaseAction(ObligationPolicyDatabaseActionType.DEL, obligation));
}
}
}
}
} catch (CheckedAnalysisException e) {
AnalysisContext.logError("Error checking " + invokedMethod, e);
} catch (ClassNotFoundException e) {
AnalysisContext.reportMissingClass(e);
} finally { }
}
if (DEBUG_LOOKUP && !actionList.isEmpty()) {
System.out.println(" At " + handle + ": " + actionList);
}
}
} else if (ins instanceof PUTFIELD || ins instanceof PUTSTATIC || ins instanceof ARETURN) {
Location loc = new Location(handle, block);
try {
TypeFrame typeFrame = typeDataflow.getFactAtLocation(loc);
if (typeFrame.isValid()) {
Type tosType = typeFrame.getTopValue();
if (tosType instanceof ObjectType) {