diff --git a/spring-batch-execution/src/main/java/org/springframework/batch/execution/job/SimpleJob.java b/spring-batch-execution/src/main/java/org/springframework/batch/execution/job/SimpleJob.java index edce1ddc3..2a026861e 100644 --- a/spring-batch-execution/src/main/java/org/springframework/batch/execution/job/SimpleJob.java +++ b/spring-batch-execution/src/main/java/org/springframework/batch/execution/job/SimpleJob.java @@ -57,10 +57,6 @@ public class SimpleJob extends AbstractJob { } } - public void setListener(JobListener listener) { - this.listener.register(listener); - } - /** * Run the specified job by looping through the steps and delegating to the * {@link Step}. diff --git a/spring-batch-execution/src/main/java/org/springframework/batch/execution/step/ItemOrientedStep.java b/spring-batch-execution/src/main/java/org/springframework/batch/execution/step/ItemOrientedStep.java index 0a48dabfd..ee3984af6 100644 --- a/spring-batch-execution/src/main/java/org/springframework/batch/execution/step/ItemOrientedStep.java +++ b/spring-batch-execution/src/main/java/org/springframework/batch/execution/step/ItemOrientedStep.java @@ -116,15 +116,6 @@ public class ItemOrientedStep extends AbstractStep implements InitializingBean { listener.register(listeners[i]); } } - - /** - * Register the objects as a listener. - * @see #setListeners(Object[]) - * @param listener the listener to set - */ - public void setListener(Object listener) { - this.listener.register(listener); - } /** * The {@link RepeatOperations} to use for the outer loop of the batch diff --git a/spring-batch-execution/src/test/java/org/springframework/batch/execution/job/SimpleJobTests.java b/spring-batch-execution/src/test/java/org/springframework/batch/execution/job/SimpleJobTests.java index df11dc8a4..6ce916ffb 100644 --- a/spring-batch-execution/src/test/java/org/springframework/batch/execution/job/SimpleJobTests.java +++ b/spring-batch-execution/src/test/java/org/springframework/batch/execution/job/SimpleJobTests.java @@ -141,14 +141,14 @@ public class SimpleJobTests extends TestCase { } public void testRunNormallyWithListener() throws Exception { - job.setListener(new JobListenerSupport() { + job.setListeners(new JobListenerSupport[] {new JobListenerSupport() { public void beforeJob(JobExecution jobExecution) { list.add("before"); } public void afterJob() { list.add("after"); } - }); + }}); job.execute(jobExecution); assertEquals(4, list.size()); } diff --git a/spring-batch-samples/src/main/resources/jobs/beanWrapperMapperSampleJob.xml b/spring-batch-samples/src/main/resources/jobs/beanWrapperMapperSampleJob.xml index 69c7ef75c..9a9a6fa62 100644 --- a/spring-batch-samples/src/main/resources/jobs/beanWrapperMapperSampleJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/beanWrapperMapperSampleJob.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/compositeProcessorSampleJob.xml b/spring-batch-samples/src/main/resources/jobs/compositeProcessorSampleJob.xml index a057938c2..072710e03 100644 --- a/spring-batch-samples/src/main/resources/jobs/compositeProcessorSampleJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/compositeProcessorSampleJob.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/fixedLengthImportJob.xml b/spring-batch-samples/src/main/resources/jobs/fixedLengthImportJob.xml index 79c5ce50d..295738164 100644 --- a/spring-batch-samples/src/main/resources/jobs/fixedLengthImportJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/fixedLengthImportJob.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/multilineJob.xml b/spring-batch-samples/src/main/resources/jobs/multilineJob.xml index 59d74c699..d092644f6 100644 --- a/spring-batch-samples/src/main/resources/jobs/multilineJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/multilineJob.xml @@ -12,7 +12,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/parallelJob.xml b/spring-batch-samples/src/main/resources/jobs/parallelJob.xml index 8aff10c02..652b40230 100644 --- a/spring-batch-samples/src/main/resources/jobs/parallelJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/parallelJob.xml @@ -18,7 +18,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/restartSample.xml b/spring-batch-samples/src/main/resources/jobs/restartSample.xml index b5b16a902..9fb61a640 100644 --- a/spring-batch-samples/src/main/resources/jobs/restartSample.xml +++ b/spring-batch-samples/src/main/resources/jobs/restartSample.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/rollbackJob.xml b/spring-batch-samples/src/main/resources/jobs/rollbackJob.xml index 00c4da0e8..0ba32f536 100644 --- a/spring-batch-samples/src/main/resources/jobs/rollbackJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/rollbackJob.xml @@ -25,7 +25,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/tradeJob.xml b/spring-batch-samples/src/main/resources/jobs/tradeJob.xml index 44b008dee..0171b6c4f 100644 --- a/spring-batch-samples/src/main/resources/jobs/tradeJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/tradeJob.xml @@ -16,7 +16,7 @@ - + diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/XmlStaxJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/XmlStaxJobFunctionalTests.java index 9806453fd..6ad96c9c2 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/XmlStaxJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/XmlStaxJobFunctionalTests.java @@ -36,7 +36,6 @@ public class XmlStaxJobFunctionalTests extends AbstractValidatingBatchLauncherTe * Output should be the same as input */ protected void validatePostConditions() throws Exception { - XMLUnit.setIgnoreWhitespace(true); XMLAssert.assertXMLEqual(new FileReader(EXPECTED_OUTPUT_FILE), new FileReader(OUTPUT_FILE)); }