3333
3434public class UnnecessarySpringExtension extends Recipe {
3535
36- //All of the following annotations apply the @SpringExtension
36+ // All the following annotations apply the @SpringExtension
3737 private static final List <String > SPRING_BOOT_TEST_ANNOTATIONS = Arrays .asList (
3838 "org.springframework.boot.test.context.SpringBootTest" ,
3939 "org.springframework.boot.test.autoconfigure.jdbc.JdbcTest" ,
@@ -50,7 +50,8 @@ public class UnnecessarySpringExtension extends Recipe {
5050 "org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest" ,
5151 "org.springframework.boot.test.autoconfigure.data.neo4j.DataNeo4jTest" ,
5252 "org.springframework.boot.test.autoconfigure.data.r2dbc.DataR2dbcTest" ,
53- "org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest"
53+ "org.springframework.boot.test.autoconfigure.data.redis.DataRedisTest" ,
54+ "org.springframework.batch.test.context.SpringBatchTest"
5455 );
5556 private static final String EXTEND_WITH_SPRING_EXTENSION_ANNOTATION_PATTERN = "@org.junit.jupiter.api.extension.ExtendWith(org.springframework.test.context.junit.jupiter.SpringExtension.class)" ;
5657
@@ -76,8 +77,8 @@ protected TreeVisitor<?, ExecutionContext> getVisitor() {
7677 @ Override
7778 public J .ClassDeclaration visitClassDeclaration (J .ClassDeclaration classDecl , ExecutionContext ctx ) {
7879
79- //Clear the class body to make annotation search and replace faster
80- //noinspection ConstantConditions
80+ // Clear the class body to make annotation search and replace faster
81+ // noinspection ConstantConditions
8182 J .ClassDeclaration c = classDecl .withBody (null );
8283
8384 AtomicBoolean annotationFound = new AtomicBoolean (false );
@@ -98,7 +99,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex
9899 };
99100 }
100101
101- //Using this visitor vs making 15 calls to findAnnotations.
102+ // Using this visitor vs making 15 calls to findAnnotations.
102103 private static class FindBootTestAnnotation extends JavaIsoVisitor <AtomicBoolean > {
103104
104105 @ Override
0 commit comments