diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBean.java index 2814b8c9c..fe5d7030f 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBean.java @@ -75,9 +75,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean extends SimpleStepFactoryBean rollbackClassifier = new Classifier() { public Boolean classify(Throwable classifiable) { @@ -381,13 +379,4 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean Collection union(Collection c1, Collection c2) { - Collection result = new ArrayList(c1); - result.addAll(c2); - return result; - } - } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java index d4550b7ba..0d923a734 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/FaultTolerantStepFactoryBeanRetryTests.java @@ -45,7 +45,6 @@ import org.springframework.batch.core.step.AbstractStep; import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.support.ListItemReader; -import org.springframework.batch.retry.RetryException; import org.springframework.batch.retry.policy.MapRetryContextCache; import org.springframework.batch.retry.policy.SimpleRetryPolicy; import org.springframework.batch.support.transaction.ResourcelessTransactionManager; @@ -170,11 +169,7 @@ public class FaultTolerantStepFactoryBeanRetryTests { @Test public void testSkipAndRetry() throws Exception { - factory.setSkippableExceptionClasses(new HashSet>() { - { - add(Exception.class); - } - }); + factory.setSkipLimit(2); ItemReader provider = new ListItemReader(Arrays.asList("a", "b", "c", "d", "e", "f")) { public String read() { @@ -203,11 +198,6 @@ public class FaultTolerantStepFactoryBeanRetryTests { @Test public void testSkipAndRetryWithWriteFailure() throws Exception { - factory.setSkippableExceptionClasses(new HashSet>() { - { - add(RetryException.class); - } - }); factory.setListeners(new StepListener[] { new SkipListenerSupport() { public void onSkipInWrite(String item, Throwable t) { recovered.add(item); @@ -268,11 +258,6 @@ public class FaultTolerantStepFactoryBeanRetryTests { public void testSkipAndRetryWithWriteFailureAndNonTrivialCommitInterval() throws Exception { factory.setCommitInterval(3); - factory.setSkippableExceptionClasses(new HashSet>() { - { - add(RetryException.class); - } - }); factory.setListeners(new StepListener[] { new SkipListenerSupport() { public void onSkipInWrite(String item, Throwable t) { recovered.add(item); @@ -332,11 +317,7 @@ public class FaultTolerantStepFactoryBeanRetryTests { @Test public void testRetryWithNoSkip() throws Exception { - factory.setRetryableExceptionClasses(new HashSet>() { - { - add(Exception.class); - } - }); + factory.setRetryLimit(4); factory.setSkipLimit(0); ItemReader provider = new ListItemReader(Arrays.asList("b")) {