aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification
diff options
context:
space:
mode:
authorShinryuken <watertext@hotmail.it>2017-11-06 23:04:40 +0100
committerGitHub <noreply@github.com>2017-11-06 23:04:40 +0100
commit80904fd5794b1eb3ef7644c52ce3d09facf9fd04 (patch)
tree60d6b333265339a60bddd2962f06b260c5c40b62 /src/org/traccar/notification
parentf4f77d7003907a9de95beaafd08306fdc2655f42 (diff)
downloadtrackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.tar.gz
trackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.tar.bz2
trackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.zip
Minor refactoring changes
Diffstat (limited to 'src/org/traccar/notification')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java
index 56dbf7270..591f848d4 100644
--- a/src/org/traccar/notification/NotificationFormatter.java
+++ b/src/org/traccar/notification/NotificationFormatter.java
@@ -111,7 +111,10 @@ public final class NotificationFormatter {
private static String formatterLogic(VelocityContext vc, Long userId, Event event, Position position,
String templatePath) {
- VelocityContext velocityContext = vc != null ? vc : prepareContext(userId, event, position);
+ VelocityContext velocityContext = vc;
+ if (velocityContext == null) {
+ velocityContext = prepareContext(userId, event, position);
+ }
StringWriter writer = new StringWriter();
getTemplate(event, templatePath).merge(velocityContext, writer);