Skip to content

Commit b640caa

Browse files
committed
Use StoppableTasklet#stop(StepExecution) in SimpleJobOperator#stop(long executionId)
1 parent aedd19b commit b640caa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
* @author Lucas Ward
8585
* @author Will Schipp
8686
* @author Mahmoud Ben Hassine
87+
* @author Hyunsang Han
8788
* @since 2.0
8889
*/
8990
public class SimpleJobOperator implements JobOperator, InitializingBean {
@@ -350,7 +351,7 @@ public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExe
350351
Tasklet tasklet = ((TaskletStep) step).getTasklet();
351352
if (tasklet instanceof StoppableTasklet) {
352353
StepSynchronizationManager.register(stepExecution);
353-
((StoppableTasklet) tasklet).stop();
354+
((StoppableTasklet) tasklet).stop(stepExecution);
354355
StepSynchronizationManager.release();
355356
}
356357
}
@@ -363,7 +364,7 @@ public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExe
363364
}
364365
}
365366
catch (NoSuchJobException e) {
366-
logger.warn("Cannot find Job object in the job registry. StoppableTasklet#stop() will not be called", e);
367+
logger.warn("Cannot find Job object in the job registry. StoppableTasklet#stop(StepExecution stepExecution) will not be called", e);
367368
}
368369

369370
return true;

0 commit comments

Comments
 (0)