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

Completes LogRecord.getLongThreadID recipe #295

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

cjobinabo
Copy link
Contributor

@cjobinabo cjobinabo commented Sep 16, 2023

What's changed?

The pull requests introduces a ChangeMethodInvocationReturnType recipe to handle the final part of the org.openrewrite.java.migrate.DeprecatedLogRecordThreadID recipe.
Screenshot 2023-09-13 at 5 16 35 PM

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

@timtebeek @joanvr

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files

@cjobinabo cjobinabo self-assigned this Sep 16, 2023
@cjobinabo cjobinabo changed the title created ChangeMethodInvocationReturnType Completes LogRecord.getLongThreadID recipe Sep 16, 2023
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.

Looks good to me; of course there's cases we don't yet cover such as passing the return type directly into a method that only takes an int for instance, but I think those cases should be relatively rare.

@timtebeek timtebeek added enhancement New feature or request recipe Recipe requested labels Sep 18, 2023
@timtebeek timtebeek merged commit 05a5bc3 into openrewrite:main Sep 18, 2023
1 check passed
@cjobinabo
Copy link
Contributor Author

Thanks Tim! Yeah, I spent some more time exploring how to handle other test cases the current approach wouldn't handle, but decided to move on for now to write other recipes. I may revisit this recipe once we have more headroom this quarter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request recipe Recipe requested
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants