Skip to content

Commit

Permalink
Finishing touches
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Aug 11, 2024
1 parent f730a48 commit fa0eb6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import org.openrewrite.*;
import org.openrewrite.internal.ListUtils;
import org.openrewrite.internal.lang.Nullable;
import org.openrewrite.java.*;
import org.openrewrite.java.search.FindMethods;
import org.openrewrite.java.search.UsesMethod;
Expand Down Expand Up @@ -46,9 +47,9 @@ public String getDescription() {
@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
return Preconditions.check(new UsesMethod<>(STEP_BUILDER_FACTORY_GET),
new TreeVisitor<Tree, ExecutionContext>() {
new JavaVisitor<ExecutionContext>() {
@Override
public Tree visit(Tree tree, ExecutionContext ctx) {
public J visit(@Nullable Tree tree, ExecutionContext ctx) {
tree = new AddJobRepositoryVisitor().visit(tree, ctx);
return new NewStepBuilderVisitor().visit(tree, ctx);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void defaults(RecipeSpec spec) {
"spring-batch-core-4.3.+",
"spring-batch-infrastructure-4.3.+",
"spring-beans-4.3.30.RELEASE",
// "spring-core-4.3.30.RELEASE",
"spring-context-4.3.30.RELEASE"
));
}
Expand All @@ -51,7 +50,7 @@ void replaceStepBuilderFactoryWithTasket() {
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Autowired
private StepBuilderFactory stepBuilderFactory;
Expand All @@ -71,7 +70,7 @@ Step myStep(Tasklet myTasklet) {
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Bean
Step myStep(Tasklet myTasklet, JobRepository jobRepository) {
Expand All @@ -98,7 +97,7 @@ void replaceStepBuilderFactoryWithChunk() {
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Autowired
private StepBuilderFactory stepBuilderFactory;
Expand Down Expand Up @@ -129,7 +128,7 @@ private ItemReader<String> reader() {
import org.springframework.batch.item.ItemWriter;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Bean
Step myStep(JobRepository jobRepository) {
Expand Down Expand Up @@ -167,7 +166,7 @@ void replaceStepBuilderFactoryWithCompletionPolicyChunk() {
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Autowired
private StepBuilderFactory stepBuilderFactory;
Expand Down Expand Up @@ -203,7 +202,7 @@ private ItemReader<String> reader() {
import org.springframework.batch.repeat.CompletionPolicy;
import org.springframework.context.annotation.Bean;
public class MyJobConfig {
class MyJobConfig {
@Bean
Step myStep(JobRepository jobRepository) {
Expand Down

0 comments on commit fa0eb6d

Please sign in to comment.