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.
Sven Illgen opened INT-2991 and commented
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
Affects: 2.2.3
Reference URL: https://github.com/SpringSource/spring-integration/blob/master/spring-integration-mail/src/main/java/org/springframework/integration/mail/AbstractMailReceiver.java
The text was updated successfully, but these errors were encountered: