Skip to content

Conversation

MBoegers
Copy link
Contributor

@MBoegers MBoegers commented Nov 20, 2024

What's changed?

Disables migration to var for variables initilized by static methods.

What's your motivation?

Have you considered any alternatives or workarounds?

Skipping only those that are initialized by static generic Methods, but they are not sufficient identifiable.

Any additional context

I'll recheck with the JLS and my contacts, afterward I may file a follow-up bug.

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

@MBoegers MBoegers changed the title Fix Fix var migration of variables initialized by static methods Nov 20, 2024
@timtebeek timtebeek self-requested a review November 20, 2024 16:28
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 quick work here!

@timtebeek timtebeek merged commit d58fd75 into openrewrite:main Nov 20, 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.

Skip var replacement when the type cannot fully be resolved

2 participants