From 0daa91ca51ecbb23a7f962fd64bfe5817f8eaa29 Mon Sep 17 00:00:00 2001 From: Srk Date: Mon, 20 Nov 2017 19:55:11 +0100 Subject: Minor refactoring --- src/org/traccar/notification/NotificationFormatter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/notification/NotificationFormatter.java') diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java index ba3fdbecb..114825a83 100644 --- a/src/org/traccar/notification/NotificationFormatter.java +++ b/src/org/traccar/notification/NotificationFormatter.java @@ -88,7 +88,7 @@ public final class NotificationFormatter { public static MailMessage formatMailMessage(long userId, Event event, Position position) { String templatePath = Context.getConfig().getString("mail.templatesPath", "mail"); VelocityContext velocityContext = prepareContext(userId, event, position); - String formattedMessage = formatterLogic(velocityContext, userId, event, position, templatePath); + String formattedMessage = formatMessage(velocityContext, userId, event, position, templatePath); return new MailMessage((String) velocityContext.get("subject"), formattedMessage); } @@ -96,10 +96,10 @@ public final class NotificationFormatter { public static String formatSmsMessage(long userId, Event event, Position position) { String templatePath = Context.getConfig().getString("sms.templatesPath", "sms"); - return formatterLogic(null, userId, event, position, templatePath); + return formatMessage(null, userId, event, position, templatePath); } - private static String formatterLogic(VelocityContext vc, Long userId, Event event, Position position, + private static String formatMessage(VelocityContext vc, Long userId, Event event, Position position, String templatePath) { VelocityContext velocityContext = vc; -- cgit v1.2.3