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: Prevent ImportCleaner from importing inherited static methods #3798

Merged

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented Feb 17, 2021

Fix #3797

This PR prevents the ImportCleaner from importing static methods that are inherited from a parent class. Such imports cause compile errors if the static method is defined in a class in the default package. At best, they do absolutely nothing.

@slarse slarse changed the title wip: fix: Fix bug causing ImportCleaner to import inherited static method wip: fix: Prevent ImportCleaner from importing inherited static methods Feb 17, 2021
@slarse slarse changed the title wip: fix: Prevent ImportCleaner from importing inherited static methods review: fix: Prevent ImportCleaner from importing inherited static methods Feb 17, 2021
@slarse slarse changed the title review: fix: Prevent ImportCleaner from importing inherited static methods wip: fix: Prevent ImportCleaner from importing inherited static methods Feb 17, 2021
@slarse slarse changed the title wip: fix: Prevent ImportCleaner from importing inherited static methods review: fix: Prevent ImportCleaner from importing inherited static methods Feb 17, 2021
@monperrus
Copy link
Collaborator

LGTM, thanks!

@monperrus monperrus changed the title review: fix: Prevent ImportCleaner from importing inherited static methods fix: Prevent ImportCleaner from importing inherited static methods Feb 18, 2021
@monperrus monperrus merged commit 59f72bc into INRIA:master Feb 18, 2021
@slarse
Copy link
Collaborator Author

slarse commented Feb 19, 2021

Tested the snapshot on the previously problematic repair case, and it worked! I'll have a new PR for Verificatum on Monday.

@slarse slarse deleted the issue/3797-fix-import-cleaner-static-method-bug branch February 19, 2021 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: ImportCleaner imports inherited static methods
2 participants