diff options
author | Ivan Martinez <ivanfmartinez@users.noreply.github.com> | 2018-06-01 07:50:10 -0300 |
---|---|---|
committer | Ivan Martinez <ivanfmartinez@users.noreply.github.com> | 2018-06-01 07:50:10 -0300 |
commit | 8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a (patch) | |
tree | 3c323955b0dd3aa7a67144889a03877901e3a544 /src/org/traccar | |
parent | 633835e8e28a70fddc252e0ee92dcf7131ba167b (diff) | |
download | trackermap-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.tar.gz trackermap-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.tar.bz2 trackermap-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.zip |
make compatible with java 7
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/notification/NotificatorManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/notification/NotificatorManager.java b/src/org/traccar/notification/NotificatorManager.java index 4353b7914..0ffef5d05 100644 --- a/src/org/traccar/notification/NotificatorManager.java +++ b/src/org/traccar/notification/NotificatorManager.java @@ -54,7 +54,12 @@ public final class NotificatorManager { private static final Notificator NULL_NOTIFICATOR = new NotificationNull(); public static Notificator getNotificator(String type) { - return INSTANCE.notificators.getOrDefault(type, NULL_NOTIFICATOR); + final Notificator n = INSTANCE.notificators.get(type); + if (n == null) { + Log.error("No notificator configured for type : " + type); + return NULL_NOTIFICATOR; + } + return n; } public static Notificator getSms() { |