-
Couldn't load subscription status.
- Fork 1.1k
Description
In what version(s) of Spring Integration are you seeing this issue?
6.5.0
Describe the bug
Local temporary file suffix filter is combined in a CompositeFileListFilter instead of a ChainFileListFilter, therefore a ( localFileListfilter || temporaryFileSuffixFilter ) instead of ( localFileListfilter && temporaryFileSuffixFilter ).
If the file is beeing written as .writting suffix indicates, it shouldn't be available for message creation, yet, even if other custom filters meet the conditions.
The temporaryFileSuffixFilter should be first in the chain.
I got around that by creating a localfilelistfilter chain that includes first the same filesuffix regex filter
private FileListFilter<File> buildFilter() {
Pattern completePattern = Pattern.compile("^.*(?<!" + this.synchronizer.getTemporaryFileSuffix() + ")$");
return new CompositeFileListFilter<>(
Arrays.asList(this.localFileListFilter, new RegexPatternFileListFilter(completePattern)));
}
Line 286 in cf6ede6
| private FileListFilter<File> buildFilter() { |
To Reproduce
Issue occurs if you add custom localFileListFilter.
Expected behavior
.writting files should not be accepted no matter what
Sample
Sorry I can't push code from the corporation I am writting this repport.