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 bugs in JodaTime to JavaTime migration recipe #622

Merged
merged 3 commits into from
Dec 7, 2024

Conversation

amishra-u
Copy link
Contributor

What's changed?

Fixed following bugs in JodaTime to JavaTime migration recipe..

  1. MethodInvocation Migration: When the select of a MethodInvocation is a MethodCall and the select has not been migrated, the migration template is no longer incorrectly applied to the MethodInvocation.
  2. Variable Initializer Handling: Variables declared inside variable initializers of non-joda type were previously skipped by the JodaTimeScanner. Due to which scanner failed to mark unsafe variables in such contexts. Fixed it.

Note: During debugging also found issue with FlowPath Analysis added unit test for the same

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

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 for the continued work here and in rewrite-analysis @amishra-u !

@timtebeek timtebeek merged commit 0bd6e06 into openrewrite:main Dec 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants