Skip to content

Commit

Permalink
Update deprecated code that uses StepExecutionListenerSupport
Browse files Browse the repository at this point in the history
Backported from 376d848

Issue #4538
  • Loading branch information
fmbenhassine committed Mar 7, 2024
1 parent 5e18dd8 commit c70d40d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spring-batch-docs/src/main/asciidoc/step.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1689,14 +1689,14 @@ the condition of the execution having skipped records, as the following example

[source, java]
----
public class SkipCheckingListener extends StepExecutionListenerSupport {
public class SkipCheckingListener implements StepExecutionListener {
@Override
public ExitStatus afterStep(StepExecution stepExecution) {
String exitCode = stepExecution.getExitStatus().getExitCode();
if (!exitCode.equals(ExitStatus.FAILED.getExitCode()) &&
stepExecution.getSkipCount() > 0) {
stepExecution.getSkipCount() > 0) {
return new ExitStatus("COMPLETED WITH SKIPS");
}
else {
} else {
return null;
}
}
Expand Down

0 comments on commit c70d40d

Please sign in to comment.