So far I see the problem here:
public ImapIdleChannelAdapterSpec selector(Function<MimeMessage, Boolean> selectorFunction) {
And in the similar method of the MailInboundChannelAdapterSpec:
public S selector(Function<MimeMessage, Boolean> selectorFunction) {
The point is that most of MimeMessage API throws unchecked: jakarta.mail.MessagingException.
That is a bit inconvenient for lambda-based configuration.
The solution is to use org.springframework.integration.util.CheckedFunction.
Something similar has been fixed in JMS Java DSL a while ago. See JmsInboundGatewaySpec:
public S replyToFunction(CheckedFunction<Message, ? extends @Nullable Object, JMSException> replyToFunction) {
More info in the PR related to: #3957.
So far I see the problem here:
And in the similar method of the
MailInboundChannelAdapterSpec:The point is that most of
MimeMessageAPI throws unchecked:jakarta.mail.MessagingException.That is a bit inconvenient for lambda-based configuration.
The solution is to use
org.springframework.integration.util.CheckedFunction.Something similar has been fixed in JMS Java DSL a while ago. See
JmsInboundGatewaySpec:More info in the PR related to: #3957.