From c70d40dc2616b8a9dba9abad28db8e767745b71a Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 7 Mar 2024 10:51:36 +0100 Subject: [PATCH] Update deprecated code that uses StepExecutionListenerSupport Backported from 376d84888fea9d021676d627a55d51c1d89fc3c1 Issue #4538 --- spring-batch-docs/src/main/asciidoc/step.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-batch-docs/src/main/asciidoc/step.adoc b/spring-batch-docs/src/main/asciidoc/step.adoc index 9825377c7f..d6bed21d52 100644 --- a/spring-batch-docs/src/main/asciidoc/step.adoc +++ b/spring-batch-docs/src/main/asciidoc/step.adoc @@ -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; } }