You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the method is declared to return ImmutableList but has here been rewritten to actually return a java.util.List.
Here's a more involved example, in this case rewritten by org.openrewrite.staticanalysis.RemoveUnusedPrivateFields and org.openrewrite.java.migrate.guava.NoGuavaJava21:
What version of OpenRewrite are you using?
What is the smallest, simplest way to reproduce the problem?
Since the latest release of OpenRewrite, we're seeing it generate invalid code seemingly related to the Guava collections, perhaps related to #586.
I have not been able to reproduce these as tests, so including some samples here in the meantime.
Rewritten by
org.openrewrite.java.migrate.guava.NoGuavaJava11
:Note that the method is declared to return
ImmutableList
but has here been rewritten to actually return ajava.util.List
.Here's a more involved example, in this case rewritten by
org.openrewrite.staticanalysis.RemoveUnusedPrivateFields
andorg.openrewrite.java.migrate.guava.NoGuavaJava21
:Note how
INCLUDE_COMPONENT_TYPES
is still referenced. The code is only removed if both recipes are enabled.Both of these examples causes compiler errors. We have plenty of these examples and have rolled back to the previous version for now.
The text was updated successfully, but these errors were encountered: