[BATCH-560] Make sure file exists before setting read only
This commit is contained in:
@@ -266,8 +266,9 @@ public class FlatFileItemWriterTests extends TestCase {
|
||||
writer = new FlatFileItemWriter();
|
||||
writer.setFieldSetCreator(new PassThroughFieldSetMapper());
|
||||
FileSystemResource file = new FileSystemResource("no-such-file.foo");
|
||||
file.getFile().setReadOnly();
|
||||
writer.setResource(file);
|
||||
file.getFile().createNewFile();
|
||||
file.getFile().setReadOnly();
|
||||
writer.afterPropertiesSet();
|
||||
try {
|
||||
writer.open(executionContext);
|
||||
|
||||
Reference in New Issue
Block a user