Skip to content

Commit 6334fbf

Browse files
chldppwls12fmbenhassine
authored andcommitted
Fix incorrect code example in documentation
Issue #4550
1 parent fb18040 commit 6334fbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-batch-docs/modules/ROOT/pages/step/tasklet.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public class FileDeletingTasklet implements Tasklet, InitializingBean {
122122
public RepeatStatus execute(StepContribution contribution,
123123
ChunkContext chunkContext) throws Exception {
124124
File dir = directory.getFile();
125-
Assert.state(dir.isDirectory());
125+
Assert.state(dir.isDirectory(), "The resource must be a directory");
126126
127127
File[] files = dir.listFiles();
128128
for (int i = 0; i < files.length; i++) {
@@ -140,7 +140,7 @@ public class FileDeletingTasklet implements Tasklet, InitializingBean {
140140
}
141141
142142
public void afterPropertiesSet() throws Exception {
143-
Assert.state(directory != null, "directory must be set");
143+
Assert.state(directory != null, "Directory must be set");
144144
}
145145
}
146146
----

0 commit comments

Comments
 (0)