Cleanup code smells reported by Sonar
This is a first pass are removing some of the code smells. Many reported code smells were ignored in this effort
This commit is contained in:
committed by
Mark Pollack
parent
fa3e4e55c6
commit
8e1d38a76a
@@ -48,6 +48,8 @@ public class BatchEventsApplication {
|
||||
@Configuration
|
||||
public static class JobConfiguration {
|
||||
|
||||
private static final int DEFAULT_CHUNK_COUNT = 3;
|
||||
|
||||
@Autowired
|
||||
private JobBuilderFactory jobBuilderFactory;
|
||||
|
||||
@@ -69,7 +71,7 @@ public class BatchEventsApplication {
|
||||
@Bean
|
||||
public Step step2() {
|
||||
return this.stepBuilderFactory.get("step2")
|
||||
.<String, String>chunk(3)
|
||||
.<String, String>chunk(DEFAULT_CHUNK_COUNT)
|
||||
.reader(new ListItemReader<>(Arrays.asList("1", "2", "3", "4", "5", "6")))
|
||||
.processor(new ItemProcessor<String, String>() {
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
@@ -29,7 +30,6 @@ import org.springframework.batch.core.configuration.annotation.JobBuilderFactory
|
||||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
||||
import org.springframework.batch.core.configuration.annotation.StepScope;
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.explore.support.JobExplorerFactoryBean;
|
||||
import org.springframework.batch.core.partition.PartitionHandler;
|
||||
import org.springframework.batch.core.partition.support.Partitioner;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
|
||||
Reference in New Issue
Block a user