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 AddImport match variable's name #4747

Merged
merged 5 commits into from
Dec 5, 2024
Merged

Conversation

SiBorea
Copy link
Contributor

@SiBorea SiBorea commented Dec 5, 2024

What's changed?

The origin code is matching the JavaType.Variable.getName() with the static import member, which doesn't make any sense. And it also doesn't handle the Parameterized reference.

@timtebeek timtebeek self-requested a review December 5, 2024 09:41
@timtebeek timtebeek added the bug Something isn't working label Dec 5, 2024
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the fix here @SiBorea ; this will solve quite a few puzzling forced import issues I imagine.

@timtebeek timtebeek merged commit 72793ae into openrewrite:main Dec 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants