Support empty comments in FlatFileItemReaderBuilder
Previously, if supplying empty comments or no comments to comments() of the FlatFileItemReaderBuilder, the comments would be ignored and instead use the default comments "#" provided by the FlatFileItemReader. Resolves BATCH-2837
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
5ee6699ce3
commit
e5855c7e6b
@@ -512,10 +512,7 @@ public class FlatFileItemReaderBuilder<T> {
|
||||
}
|
||||
|
||||
reader.setLinesToSkip(this.linesToSkip);
|
||||
|
||||
if(!this.comments.isEmpty()) {
|
||||
reader.setComments(this.comments.toArray(new String[this.comments.size()]));
|
||||
}
|
||||
reader.setComments(this.comments.toArray(new String[this.comments.size()]));
|
||||
|
||||
reader.setSkippedLinesCallback(this.skippedLinesCallback);
|
||||
reader.setRecordSeparatorPolicy(this.recordSeparatorPolicy);
|
||||
|
||||
Reference in New Issue
Block a user