Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug where origins of synthetic method calls override each other #957

Merged

Commits on Sep 16, 2022

  1. fix bug where origins of synthetic method calls override each other

    Calls to lambda methods `lambda$abc$123` seem to have unique origins with current JDK versions. I.e. even two identical consecutive lambda invocations will lead to two separate synthetic methods. Unfortunately, this is not the case for synthetic `access$123` methods (to circumvent private modifiers), which lead to a bug where multiple origins of such a call would override each other.
    This lead e.g. to the behavior in #923, where the application of AspectJ introduced an `access$123` method that was called from multiple places. But, only one such call would randomly be created during the import, which lead to an unpredictable behavior of which cycles between outer and inner classes would be detected.
    We now record multiple access records for any synthetic call and trace back all those records instead of just the last one. This way all such synthetic accesses should be imported correctly now.
    
    Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
    codecholeric committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    673b054 View commit details
    Browse the repository at this point in the history