openrewrite / rewrite-migrate-java

OpenRewrite recipes for migrating to newer versions of Java.
Apache License 2.0
111 stars 75 forks source link

Fix `var` migration of variables initialized by static methods #609

Closed MBoegers closed 1 week ago

MBoegers commented 1 week ago

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