Visitar URL original
Java: Add callback dispatch to more anonymous classes. by aschackmull · Pull Request #6740 · github/codeql · GitHub
The Wayback Machine - https://web.archive.org/web/20260828135619/https://github.com/github/codeql/pull/6740
Skip to content

Java: Add callback dispatch to more anonymous classes. - #6740

Merged
aschackmull merged 1 commit into
github:mainfrom
aschackmull:java/callback-dispatch
Sep 28, 2021
Merged

Java: Add callback dispatch to more anonymous classes.#6740
aschackmull merged 1 commit into
github:mainfrom
aschackmull:java/callback-dispatch

Conversation

@aschackmull

Copy link
Copy Markdown
Contributor

This adds support for callbacks dispatching to non-lambda, non-method-reference anonymous classes.
It also allows the functional interface to be higher in the type hierarchy than the immediately implemented interface.
Finally, a bug is fixed where we used to identify the called method with FunctionalInterface.getRunMethod(), but really it should be FunctionalInterface.getRunMethod().getSourceDeclaration() for the cases where a functional interface specialises another functional interface.

@aschackmull
aschackmull requested a review from a team as a code owner September 23, 2021 13:10
@github-actions github-actions Bot added the Java label Sep 23, 2021

@bmuskalla bmuskalla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests LGTM but can't really say something about the implementation. I think it makes sense for someone else to have another look.

@aschackmull

Copy link
Copy Markdown
Contributor Author

I have btw. verified that the lambdaCreation predicate did not lose any tuples on jdk11 as a sanity check.

@aschackmull
aschackmull requested a review from hvitved September 27, 2021 13:12
@aschackmull
aschackmull merged commit fc8b439 into github:main Sep 28, 2021
@aschackmull
aschackmull deleted the java/callback-dispatch branch September 28, 2021 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants