Skip to content

Commit

Permalink
Fixes javaeekickoff#42 : unlikely argument for containsKey. Key is Em…
Browse files Browse the repository at this point in the history
…ailTemplatePart
  • Loading branch information
JEAN-PROST Frédéric committed Oct 28, 2024
1 parent fe5c263 commit 24fec75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void sendPlainText(EmailUser to, EmailUser from, String subject, String b
private Map<String, String> buildTemplateContent(EmailTemplate templateEmail, Map<String, Object> messageParameters) {
Map<EmailTemplatePart, String> templateParts = templateEmail.getTemplateParts();
Arrays.stream(EmailTemplatePart.values())
.filter(part -> !templateParts.containsKey(part.getKey()))
.filter(part -> !templateParts.containsKey(part))
.forEach(part -> templateParts.putIfAbsent(part, emailTemplateService.build(templateEmail, part, messageParameters)));

if (isEmpty(templateParts.get(BODY_TITLE))) {
Expand Down

0 comments on commit 24fec75

Please sign in to comment.