From 8ca9c6e35b8dbd9f8c66f073c0c84d6b5cd1302e Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Fri, 8 Mar 2024 20:25:49 +0100 Subject: [PATCH] Fix incorrect code example in documentation Backported from 6334fbf870a4a3b9b18bf792268861bbe87f471c Issue #4550 --- spring-batch-docs/src/main/asciidoc/step.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-batch-docs/src/main/asciidoc/step.adoc b/spring-batch-docs/src/main/asciidoc/step.adoc index d6bed21d52..50abb6de78 100644 --- a/spring-batch-docs/src/main/asciidoc/step.adoc +++ b/spring-batch-docs/src/main/asciidoc/step.adoc @@ -1373,7 +1373,7 @@ public class FileDeletingTasklet implements Tasklet, InitializingBean { public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { File dir = directory.getFile(); - Assert.state(dir.isDirectory()); + Assert.state(dir.isDirectory(), "The resource must be a directory"); File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { @@ -1391,7 +1391,7 @@ public class FileDeletingTasklet implements Tasklet, InitializingBean { } public void afterPropertiesSet() throws Exception { - Assert.state(directory != null, "directory must be set"); + Assert.state(directory != null, "Directory must be set"); } } ----