Skip to content

Conversation

@amishra-u
Copy link
Contributor

@amishra-u amishra-u commented Nov 16, 2024

What's changed?

  • Added support for safe migration of method parameters.
  • A method parameter is considered safe for migration if:
    • All expressions referencing the parameter within the method body can be migrated.
    • All arguments assigned to this parameter in method calls can be migrated.

Key Changes:

  1. Used data flow analysis to identify the referencing expressions for method parameter.
  2. Added VarTable to track all method parameters across files.
  3. Added new test cases and updated existing ones to reflect the changes.

Not Implemented Yet:

  1. Migration of method return statements.
  2. Migration of class variables.

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

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

@timtebeek timtebeek self-requested a review November 16, 2024 23:51
Co-authored-by: Tim te Beek <[email protected]>
@timtebeek timtebeek self-requested a review November 25, 2024 21:11
@timtebeek timtebeek added the recipe Recipe requested label Nov 25, 2024
@timtebeek timtebeek changed the title Joda time to Java time: Add support for Method Parameter Migration Joda-Time to Java time: Add support for Method Parameter Migration Nov 25, 2024
Copy link
Member

@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 @amishra-u ! Really coming together nicely.

@timtebeek timtebeek merged commit d6ecd54 into openrewrite:main Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

recipe Recipe requested

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants