diff options
author | Anton Tananaev <anton@traccar.org> | 2022-09-08 08:03:04 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-09-08 08:03:04 -0700 |
commit | 9b5654e253ed3dedfb43125a0611896dfa8fc863 (patch) | |
tree | e2aafa0b4f457dfe0abce5ee020e1a4ad7783ebe /src/main/java/org/traccar/session | |
parent | 3ac73dabfd5d9fb403c119574acd1581daa12b90 (diff) | |
download | trackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.tar.gz trackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.tar.bz2 trackermap-server-9b5654e253ed3dedfb43125a0611896dfa8fc863.zip |
Handle unlinked notifications
Diffstat (limited to 'src/main/java/org/traccar/session')
-rw-r--r-- | src/main/java/org/traccar/session/cache/CacheManager.java | 2 |
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 { |