Skip to content

GH-11280: Make mail selector a CheckedFunction - #11389

Open
Amlan2000 wants to merge 1 commit into
spring-projects:mainfrom
Amlan2000:GH-11280
Open

GH-11280: Make mail selector a CheckedFunction#11389
Amlan2000 wants to merge 1 commit into
spring-projects:mainfrom
Amlan2000:GH-11280

Conversation

@Amlan2000

Copy link
Copy Markdown
Contributor

Make mail selector accept CheckedFunction

Summary

The mail DSL selector() methods previously accepted a regular Function<MimeMessage, Boolean>. This prevented selector functions from directly handling MessagingException.

Updated the mail selector to accept a CheckedFunction<MimeMessage, Boolean, MessagingException>, allowing checked MessagingException handling while preserving the existing selector behavior.

Changes

  • Updated the mail DSL selector to accept CheckedFunction<MimeMessage, Boolean, MessagingException>.
  • Applied the same change to the IMAP and mail inbound adapter specifications.
  • Updated the existing MailTests to configure function-based selectors for the IMAP and IMAP IDLE flows.
  • Verified the changes with the full spring-integration-mail test suite.

Fixes #11280

Fixes: spring-projects#11280

* Change mail DSL selector to accept CheckedFunction
* Add test coverage for function-based selectors

Signed-off-by: amlan2000 <amlanmishra0911@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Function<MimeMessage, ?> as CheckedFunction in Mail Java DSL

1 participant