From: Roland Häder Date: Thu, 18 Jul 2019 03:46:01 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=78bdd544124d7c71ae03ad675e8d5d711fd64124;p=jjobs-mailer-ejb.git Please cherry-pick: - added final modifier because these references shall never be changed - used interface Context as type (updated signature of inherited method) Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/mailer/model/delivery/JobsMailerSingletonBean.java b/src/java/org/mxchange/jjobs/mailer/model/delivery/JobsMailerSingletonBean.java index f819f07..e210edd 100644 --- a/src/java/org/mxchange/jjobs/mailer/model/delivery/JobsMailerSingletonBean.java +++ b/src/java/org/mxchange/jjobs/mailer/model/delivery/JobsMailerSingletonBean.java @@ -27,6 +27,7 @@ import javax.mail.MessagingException; import javax.mail.Session; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; +import org.apache.velocity.context.Context; import org.mxchange.jmailee.model.delivery.BaseMailerBean; import org.mxchange.jmailee.model.delivery.wrapper.WrapableEmailDelivery; @@ -46,7 +47,7 @@ public class JobsMailerSingletonBean extends BaseMailerBean implements Deliverab /** * Configuration file */ - private final String configFile = "org.mxchange.jmailer.config"; //NOI18N//NOI18N + private final String configFile = "org.mxchange.jmailer.config"; //NOI18N /** * Email session @@ -137,10 +138,10 @@ public class JobsMailerSingletonBean extends BaseMailerBean implements Deliverab } // All required data is set, load template - Template template = this.getTemplateEngine().getTemplate(String.format("templates/%s/%s.vm", emailWrapper.getLocale().getLanguage().toLowerCase(), emailWrapper.getTemplateName())); //NOI18N + final Template template = this.getTemplateEngine().getTemplate(String.format("templates/%s/%s.vm", emailWrapper.getLocale().getLanguage().toLowerCase(), emailWrapper.getTemplateName())); //NOI18N // Init context - VelocityContext context = new VelocityContext(); + final Context context = new VelocityContext(); // Are some variables set? if ((emailWrapper.getTemplateVariables() != null) && (!emailWrapper.getTemplateVariables().isEmpty())) {