diff options
author | Shinryuken <watertext@hotmail.it> | 2017-11-06 23:04:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 23:04:40 +0100 |
commit | 80904fd5794b1eb3ef7644c52ce3d09facf9fd04 (patch) | |
tree | 60d6b333265339a60bddd2962f06b260c5c40b62 | |
parent | f4f77d7003907a9de95beaafd08306fdc2655f42 (diff) | |
download | trackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.tar.gz trackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.tar.bz2 trackermap-server-80904fd5794b1eb3ef7644c52ce3d09facf9fd04.zip |
Minor refactoring changes
-rw-r--r-- | src/org/traccar/notification/NotificationFormatter.java | 5 |
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); |