From f3f12a2ff295d8e60a87e521d09022a2c09763cf Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 3 Dec 2023 08:19:32 -0800 Subject: Use is empty --- src/main/java/org/traccar/session/cache/CacheManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/session/cache/CacheManager.java b/src/main/java/org/traccar/session/cache/CacheManager.java index 58320cf29..0aadb3692 100644 --- a/src/main/java/org/traccar/session/cache/CacheManager.java +++ b/src/main/java/org/traccar/session/cache/CacheManager.java @@ -381,7 +381,7 @@ public class CacheManager implements BroadcastInterface { var key = new CacheKey(clazz, id); deviceCache.computeIfPresent(key, (k, value) -> { value.release(deviceId); - return value.getReferences().size() > 0 ? value : null; + return value.getReferences().isEmpty() ? null : value; }); })); devicePositions.remove(deviceId); -- cgit v1.2.3