USVT-132 修改可能因为 AWS 没有配置参数而导致的空对象异常

This commit is contained in:
YuCheng Hu 2023-01-05 09:51:47 -05:00
parent e2c3cac7a8
commit daa8a96ca7
1 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import com.mailgun.api.v3.MailgunMessagesApi;
import com.mailgun.client.MailgunClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -79,9 +80,10 @@ public class AwsUtils {
// Update the map
for (Map.Entry<String, String> entry : parameterConfMap.entrySet()) {
if (ObjectUtils.isNotEmpty(awsKVMap.get(parameterStorePath + "/" + entry.getKey()))) {
parameterConfMap.put(entry.getKey(), awsKVMap.get(parameterStorePath + "/" + entry.getKey()).getValue());
}
}
return parameterConfMap;
}
}