Skip to content

Use Optional instead of getOrDefault for settings in testSMTPConnection - #41661

Merged
pskopek merged 1 commit into
keycloak:mainfrom
rmartinc:issue-41643
Aug 7, 2025
Merged

pskopek merged 1 commit into
keycloak:mainfrom
rmartinc:issue-41643

Conversation

@rmartinc

@rmartinc rmartinc commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Closes #41643

The getOrDefault returns null when null is explicitly set in the map. And it seems that the console sends "port":null in the json. So the PR just changes that method for an Optional for the parameters received for the test. We cannot test explicitly the default null port because the SMTP server cannot run using privileged 25.

@rmartinc
rmartinc requested a review from a team as a code owner August 5, 2025 09:25

@pskopek pskopek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

Test SMTP connection fails when no port is specified

4 participants