openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.03k stars 300 forks source link

Issue discovered with `src/main/java/org/openrewrite/java/security/spring/GenerateWebSecurityConfigurerAdapter.java` #1340

Closed jkschneider closed 2 years ago

jkschneider commented 2 years ago

Problem

Incorrectly removed static import.

Example diff

 import java.util.concurrent.atomic.AtomicReference;

 import static java.util.Collections.singletonList;
-import static org.openrewrite.Tree.randomId;

 @RequiredArgsConstructor
 public class GenerateWebSecurityConfigurerAdapter {

Recipes in example diff:

References:

sambsnyd commented 2 years ago

This is fixed on latest openrewrite