`java.lang.IllegalStateException`: LST contains missing or invalid type information in OpenRewrite Custom Java Recipe
I’m working on a migration recipe using OpenRewrite to transform Play Framework controllers into Spring Boot REST controllers. However, I’m encountering the following error when running my test, given the ok() is a static method in play.mvc.Results class.
How can I reference the class the recipe is applied on in Openrewrite
When I try my test for the recipe I get an IllegalStateException
:
How to define style for OpenRewrite to reorder Imports (OrderImports)
I am searching for an example rewrite.yml -file to use the org.openrewrite.java.OrderImports-plugin to define a custom ordering for the import statements.
OpenRewrite – How to replace a method in a chained/fluent method invocation?
I am currently getting started with writing rewrite recipes and am struggling a bit with replacing methods in a fluent interface. In particular, I’d like to replace .isEqualTo(200)
(and once that works also .isEqualTo(HttpStatusCode.valueOf(200)
) with .isOk()
: