Skip to content
Snippets Groups Projects
Commit fff26cd8 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4870 check if smtpServer is null

parent dd592f43
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,9 @@ interface KeycloakRealmMapper {
@Named("smtpServer")
default Map<String, String> mapSmtpServer(OzgCloudKeycloakRealmSpec.KeycloakRealmSMTPServer server) {
Map<String, String> smtpServer = new HashMap<>();
if( server != null ) {
if( server.getHost() != null )
smtpServer.put("host", server.getHost());
if( server.getPort() != null )
......@@ -71,7 +73,9 @@ interface KeycloakRealmMapper {
smtpServer.put("from", server.getFrom());
if( server.getFromDisplayName() != null )
smtpServer.put("fromDisplayName", server.getFromDisplayName());
}
return smtpServer;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment