From 0d06a7c46a7198e9bc01cc05de2fe1cea7726ca6 Mon Sep 17 00:00:00 2001 From: Mario Petrovski Date: Wed, 28 Feb 2024 13:58:38 +0100 Subject: [PATCH] Update deprecated code that uses StepExecutionListenerSupport Closes #4538 --- .../modules/ROOT/pages/step/controlling-flow.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-batch-docs/modules/ROOT/pages/step/controlling-flow.adoc b/spring-batch-docs/modules/ROOT/pages/step/controlling-flow.adoc index 7d3e70ab23..03670bc31b 100644 --- a/spring-batch-docs/modules/ROOT/pages/step/controlling-flow.adoc +++ b/spring-batch-docs/modules/ROOT/pages/step/controlling-flow.adoc @@ -294,14 +294,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; } }