Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Complete
-
Affects Version/s: 2.2.3
-
Component/s: Mail Support
-
Labels:
Description
The method filterMessagesThruSelector (line 310) doesn't work as expected.
If you set a mail-filter-expression normally the not matched mails shouldn't be marked as seen, but they are marked as seen. On line 325 in AbstractMailReceiver all messages are added to the filteredMessage List. Looks like there is an else clause missing so that it will only be added if the filter expression matches or if there is no filter expression.
The Spring integration 2.1.x version contains this else clause in the receive method. See
https://github.com/SpringSource/spring-integration/blob/2.1.x/spring-integration-mail/src/main/java/org/springframework/integration/mail/AbstractMailReceiver.java
Line 272-287