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

org.openrewrite.java.ChangePackage precise package match #4189

Merged

Conversation

Dinozavvvr
Copy link
Contributor

@Dinozavvvr Dinozavvvr commented May 12, 2024

The mistake was in isTargetRecursivePackageName(String packageName) not in package name match in preVisit(..)

When I tried to fix matching condition I found that typeInNestedPackageInheritingFromTypeInBasePackage test fails and then I found this

Fixes #4188

@Dinozavvvr Dinozavvvr changed the title Fixed issue [org.openrewrite.java.ChangePackage precise match](https://github.com/openrewrite/rewrite/issues/4188) Fixed issue #4188 org.openrewrite.java.ChangePackage precise match May 12, 2024
@Dinozavvvr Dinozavvvr changed the title Fixed issue #4188 org.openrewrite.java.ChangePackage precise match Fix #4188 org.openrewrite.java.ChangePackage precise match May 12, 2024
@timtebeek timtebeek added the bug Something isn't working label May 14, 2024
@timtebeek timtebeek marked this pull request as ready for review May 14, 2024 08:46
@timtebeek timtebeek self-requested a review May 14, 2024 08:46
@timtebeek timtebeek changed the title Fix #4188 org.openrewrite.java.ChangePackage precise match org.openrewrite.java.ChangePackage precise package match May 18, 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 your persistence in getting this fixed! I love how small the actual change to the recipe is, and how thorough you have tested this to ensure we're doing the right thing in various scenarios. Much appreciated!

@timtebeek timtebeek merged commit a164e19 into openrewrite:main May 18, 2024
1 check 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.

org.openrewrite.java.ChangePackage precise match
3 participants