aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/notification/NotificatorManager.java7
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() {