From f3b8aa2e7355ca7bf7a8cf8c60e703300361cfe1 Mon Sep 17 00:00:00 2001 From: wkhaksar <31837615+wkhaksar@users.noreply.github.com> Date: Thu, 4 Nov 2021 17:31:21 +0100 Subject: Update src/main/java/org/traccar/notification/TextTemplateFormatter.java Co-authored-by: Anton Tananaev --- src/main/java/org/traccar/notification/TextTemplateFormatter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/org/traccar/notification/TextTemplateFormatter.java b/src/main/java/org/traccar/notification/TextTemplateFormatter.java index 6a95628f0..b7058c824 100644 --- a/src/main/java/org/traccar/notification/TextTemplateFormatter.java +++ b/src/main/java/org/traccar/notification/TextTemplateFormatter.java @@ -74,8 +74,7 @@ public final class TextTemplateFormatter { public static NotificationMessage formatMessage(VelocityContext velocityContext, String name, String templatePath) { StringWriter writer = new StringWriter(); getTemplate(name, templatePath).merge(velocityContext, writer); - String formattedMessage = writer.toString(); - return new NotificationMessage((String) velocityContext.get("subject"), formattedMessage); + return new NotificationMessage((String) velocityContext.get("subject"), writer.toString()); } } -- cgit v1.2.3