aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-08 08:03:04 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-08 08:03:04 -0700
commit9b5654e253ed3dedfb43125a0611896dfa8fc863 (patch)
treee2aafa0b4f457dfe0abce5ee020e1a4ad7783ebe
parent3ac73dabfd5d9fb403c119574acd1581daa12b90 (diff)
downloadtrackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.tar.gz
trackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.tar.bz2
trackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.zip
Handle unlinked notifications
-rw-r--r--src/main/java/org/traccar/session/cache/CacheManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java
index 6f6b648fa..64397b368 100644
--- a/src/main/java/org/traccar/session/cache/CacheManager.java
+++ b/src/main/java/org/traccar/session/cache/CacheManager.java
@@ -132,7 +132,7 @@ public class CacheManager implements BroadcastInterface {
lock.readLock().lock();
var users = deviceLinks.get(deviceId).get(User.class).stream()
.collect(Collectors.toUnmodifiableSet());
- return notificationUsers.get(notificationId).stream()
+ return notificationUsers.getOrDefault(notificationId, new LinkedList<>()).stream()
.filter(user -> users.contains(user.getId()))
.collect(Collectors.toUnmodifiableList());
} finally {