aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 07:50:10 -0300
committerIvan Martinez <ivanfmartinez@users.noreply.github.com>2018-06-01 07:50:10 -0300
commit8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a (patch)
tree3c323955b0dd3aa7a67144889a03877901e3a544 /src/org
parent633835e8e28a70fddc252e0ee92dcf7131ba167b (diff)
downloadtraccar-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.tar.gz
traccar-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.tar.bz2
traccar-server-8ca7b2d0d9b5e18dd7e96a2cf5b1b8d8d751051a.zip
make compatible with java 7
Diffstat (limited to 'src/org')
-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() {