rewrite-spring
rewrite-spring copied to clipboard
Whitespace not preserved when applying `SpringBoot2BestPractices` recipe
Playing with https://public.moderne.io/ I noticed that the "demo recipe" org.openrewrite.java.spring.boot2.SpringBoot2BestPractices
doesn't preserve all whitespace in the affected sources and thus results in unexpected changes.
See this example for instance where in the BeanFactoryAwareFunctionRegistryMultiInOutTests.java source some whitespace between actual parameters is removed on line 316:
The same problem can be seen for formal parameters (whitespace after comma in parameter list is not preserved). I didn't analyze this any further, so the problem may not be related to this particular recipe.
@traceyyoshima do you have any time to look into this?