Skip to content

Support static final MethodHandles and MethodTypes #3

Description

@SirYwell

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions