OPEN - issue BATCH-1129: Problems with exception classifications

http://jira.springframework.org/browse/BATCH-1129
This commit is contained in:
dsyer
2009-03-10 12:10:23 +00:00
parent add37da810
commit 464ebc577a
8 changed files with 145 additions and 39 deletions

View File

@@ -70,7 +70,7 @@ public class FlatFileItemReader<T> extends AbstractItemCountingItemStreamItemRea
private LineCallbackHandler skippedLinesCallback;
private boolean strict = false;
private boolean strict = true;
public FlatFileItemReader() {
setName(ClassUtils.getShortName(FlatFileItemReader.class));
@@ -243,7 +243,7 @@ public class FlatFileItemReader<T> extends AbstractItemCountingItemStreamItemRea
noInput = false;
if (!resource.exists()) {
if (strict) {
throw new IllegalStateException("Input resource must exist (reader is in 'strict' mode)");
throw new IllegalStateException("Input resource must exist (reader is in 'strict' mode): "+resource);
}
noInput = true;
logger.warn("Input resource does not exist " + resource.getDescription());