From 8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a Mon Sep 17 00:00:00 2001 From: Ivan Martinez Date: Fri, 1 Jun 2018 07:50:10 -0300 Subject: make compatible with java 7 --- src/org/traccar/notification/NotificatorManager.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/org') 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() { -- cgit v1.2.3