From 2c0bddc1e11f11d7b108b69b989f77e59f935f8f Mon Sep 17 00:00:00 2001 From: Yejin Choi <63734765+chldppwls12@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:11:26 +0900 Subject: [PATCH] Fix incorrect code example in documentation Issue #4550 --- spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc b/spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc index 2613e34878..7ad23b8dae 100644 --- a/spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc +++ b/spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc @@ -122,7 +122,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++) { @@ -140,7 +140,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"); } } ----