From 4c1746e21da06e08613b535b49d9d338ceee9fbb Mon Sep 17 00:00:00 2001 From: Vivek 0001f9d0 Date: Thu, 19 Dec 2024 16:17:15 -0500 Subject: [PATCH] minor cleanup in MailService.java --- .../java/_package_/service/MailService.java.ejs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/generators/spring-boot/templates/src/main/java/_package_/service/MailService.java.ejs b/generators/spring-boot/templates/src/main/java/_package_/service/MailService.java.ejs index 60a017b6a538..136d61687779 100644 --- a/generators/spring-boot/templates/src/main/java/_package_/service/MailService.java.ejs +++ b/generators/spring-boot/templates/src/main/java/_package_/service/MailService.java.ejs @@ -88,11 +88,11 @@ public class MailService { public void sendEmail(String to, String subject, String content, boolean isMultipart, boolean isHtml) { <%_ if (reactive) { _%> Mono.defer(() -> { - this.sendEmailSync(to, subject, content, isMultipart, isHtml); + sendEmailSync(to, subject, content, isMultipart, isHtml); return Mono.empty(); }).subscribe(); <%_ } else { _%> - this.sendEmailSync(to, subject, content, isMultipart, isHtml); + sendEmailSync(to, subject, content, isMultipart, isHtml); <%_ } _%> } @@ -127,11 +127,11 @@ public class MailService { public void sendEmailFromTemplate(<%= user.persistClass %> user, String templateName, String titleKey) { <%_ if (reactive) { _%> Mono.defer(() -> { - this.sendEmailFromTemplateSync(user, templateName, titleKey); + sendEmailFromTemplateSync(user, templateName, titleKey); return Mono.empty(); }).subscribe(); <%_ } else { _%> - this.sendEmailFromTemplateSync(user, templateName, titleKey); + sendEmailFromTemplateSync(user, templateName, titleKey); <%_ } _%> } @@ -146,7 +146,7 @@ public class MailService { context.setVariable(BASE_URL, jHipsterProperties.getMail().getBaseUrl()); String content = templateEngine.process(templateName, context); String subject = messageSource.getMessage(titleKey, null, locale); - this.sendEmailSync(user.getEmail(), subject, content, false, true); + sendEmailSync(user.getEmail(), subject, content, false, true); } <%_ if (!authenticationTypeOauth2) { _%> @@ -155,7 +155,7 @@ public class MailService { <%_ } _%> public void sendActivationEmail(<%= user.persistClass %> user) { LOG.debug("Sending activation email to '{}'", user.getEmail()); - this.<%- localSendEmailFromTemplateApi %>(user, "mail/activationEmail", "email.activation.title"); + <%- localSendEmailFromTemplateApi %>(user, "mail/activationEmail", "email.activation.title"); } <%_ if (!reactive) { _%> @@ -163,7 +163,7 @@ public class MailService { <%_ } _%> public void sendCreationEmail(<%= user.persistClass %> user) { LOG.debug("Sending creation email to '{}'", user.getEmail()); - this.<%- localSendEmailFromTemplateApi %>(user, "mail/creationEmail", "email.activation.title"); + <%- localSendEmailFromTemplateApi %>(user, "mail/creationEmail", "email.activation.title"); } <%_ if (!reactive) { _%> @@ -171,7 +171,7 @@ public class MailService { <%_ } _%> public void sendPasswordResetMail(<%= user.persistClass %> user) { LOG.debug("Sending password reset email to '{}'", user.getEmail()); - this.<%- localSendEmailFromTemplateApi %>(user, "mail/passwordResetEmail", "email.reset.title"); + <%- localSendEmailFromTemplateApi %>(user, "mail/passwordResetEmail", "email.reset.title"); } <%_ } _%> }