From 566fc6e5fcc8d755cca16866f554306ef539d024 Mon Sep 17 00:00:00 2001 From: robokaso Date: Tue, 1 Jul 2008 08:38:59 +0000 Subject: [PATCH] RESOLVED - BATCH-414: consistent handling of empty input by ItemReaders renamed NoWorkFoundListener to NoWorkFoundStepExecutionListener --- ...Listener.java => NoWorkFoundStepExecutionListener.java} | 2 +- ...sts.java => NoWorkFoundStepExecutionListenerTests.java} | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) rename spring-batch-core/src/main/java/org/springframework/batch/core/step/{NoWorkFoundListener.java => NoWorkFoundStepExecutionListener.java} (93%) rename spring-batch-core/src/test/java/org/springframework/batch/core/step/{NoWorkFoundListenerTests.java => NoWorkFoundStepExecutionListenerTests.java} (87%) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java similarity index 93% rename from spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundListener.java rename to spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java index d98b59575..4d40e5f97 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java @@ -26,7 +26,7 @@ import org.springframework.batch.repeat.ExitStatus; * * @author Robert Kasanicky */ -public class NoWorkFoundListener extends StepExecutionListenerSupport { +public class NoWorkFoundStepExecutionListener extends StepExecutionListenerSupport { public ExitStatus afterStep(StepExecution stepExecution) { if (stepExecution.getItemCount().intValue() == 0) { diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundListenerTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListenerTests.java similarity index 87% rename from spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundListenerTests.java rename to spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListenerTests.java index be95eb31d..ec3da5d87 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundListenerTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListenerTests.java @@ -22,9 +22,12 @@ import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.StepExecution; import org.springframework.batch.item.NoWorkFoundException; -public class NoWorkFoundListenerTests extends TestCase { +/** + * Tests for {@link NoWorkFoundStepExecutionListener}. + */ +public class NoWorkFoundStepExecutionListenerTests extends TestCase { - private NoWorkFoundListener tested = new NoWorkFoundListener(); + private NoWorkFoundStepExecutionListener tested = new NoWorkFoundStepExecutionListener(); /** * If item count is zero exception is thrown