NIHVIVO-2693 Minor refactoring in FreemarkerEmailMessage.processTemplate(): don't need to create an Environment object to process the template, because we no longer need to add the request object as a custom attribute of the Environment. Just call Template.process() instead.
This commit is contained in:
parent
cc6558d3f5
commit
d7f7155f1b
1 changed files with 1 additions and 4 deletions
|
@ -160,10 +160,7 @@ public class FreemarkerEmailMessage {
|
|||
|
||||
try {
|
||||
Template template = config.getTemplate(templateName);
|
||||
Environment env = template.createProcessingEnvironment(bodyMap,
|
||||
new StringWriter());
|
||||
env.setCustomAttribute("request", req);
|
||||
env.process();
|
||||
template.process(bodyMap, new StringWriter());
|
||||
} catch (TemplateException e) {
|
||||
log.error(e, e);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue