diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletAdapter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletAdapter.java index dd2bfb481..53f4049fc 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletAdapter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletAdapter.java @@ -46,8 +46,8 @@ public class TaskletAdapter extends AbstractMethodInvokingDelegator implements T /** * If the result is an {@link ExitStatus} already just return that, - * otherwise return {@link ExitStatus#FINISHED} if the result is null and - * {@link ExitStatus#CONTINUABLE} if not. + * otherwise return {@link ExitStatus#FINISHED}. + * * @param result the value returned by the delegate method * @return an {@link ExitStatus} consistent with the result */ @@ -55,10 +55,7 @@ public class TaskletAdapter extends AbstractMethodInvokingDelegator implements T if (result instanceof ExitStatus) { return (ExitStatus) result; } - if (result == null) { - return ExitStatus.FINISHED; - } - return ExitStatus.CONTINUABLE; + return ExitStatus.FINISHED; } } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletAdapterTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletAdapterTests.java index 0998a1cb8..6a390a4a7 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletAdapterTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletAdapterTests.java @@ -67,7 +67,7 @@ public class TaskletAdapterTests extends TestCase { public void testMapResultWithNonNull() throws Exception { tasklet.setTargetMethod("process"); this.result = "foo"; - assertEquals(ExitStatus.CONTINUABLE, tasklet.execute()); + assertEquals(ExitStatus.FINISHED, tasklet.execute()); } }