From ad48694d93fc69a32a62f9ecb75b1350b72c8536 Mon Sep 17 00:00:00 2001 From: Dan Galdi Date: Mon, 12 Aug 2024 15:29:45 -0400 Subject: [PATCH] Fix default smtp host logic --- .../java/org/gusdb/wdk/model/config/ModelConfigBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Model/src/main/java/org/gusdb/wdk/model/config/ModelConfigBuilder.java b/Model/src/main/java/org/gusdb/wdk/model/config/ModelConfigBuilder.java index 4d87234e0..228fd81c3 100644 --- a/Model/src/main/java/org/gusdb/wdk/model/config/ModelConfigBuilder.java +++ b/Model/src/main/java/org/gusdb/wdk/model/config/ModelConfigBuilder.java @@ -37,7 +37,7 @@ public class ModelConfigBuilder { private String _assetsUrl; // email setup - private String _smtpServer = "localhost"; + private String _smtpServer; private String _smtpUsername; private String _smtpPassword; private String _supportEmail; @@ -97,6 +97,7 @@ public ModelConfig build() throws WdkModelException { //assertNonNull("userDatasetStoreConfig", _userDatasetStoreConfig); Optional smtpUsername = Optional.ofNullable(_smtpUsername).filter(s -> !s.isBlank()); Optional smtpPassword = Optional.ofNullable(_smtpPassword).filter(s -> !s.isBlank()); + String smtpServer = _smtpServer == null ? "localhost" : _smtpServer; return new ModelConfig( @@ -120,7 +121,7 @@ public ModelConfig build() throws WdkModelException { _assetsUrl, // email setup - _smtpServer, + smtpServer, smtpUsername, smtpPassword, _supportEmail,