Currently, all the analysis is done on method-level. Also analysing fields will improve usabililty, as it's a common pattern to have method handles as (dynamic) constants.
Example of what should be supported:
class Example {
private static final MethodType TYPE = MethodType.methodType(int.class, String.class);
private static final MethodHandle HANDLE;
static {
HANDLE = MethodHandles.empty(TYPE);
}
int get() {
return (int) HANDLE.invoke("Hello World"); // detect issues here
}
}
Currently, all the analysis is done on method-level. Also analysing fields will improve usabililty, as it's a common pattern to have method handles as (dynamic) constants.
Example of what should be supported: