aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/session
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-03 08:19:32 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-03 08:19:32 -0800
commitf3f12a2ff295d8e60a87e521d09022a2c09763cf (patch)
treec701e496661920b01c520ded6c4db5d5d4a98c15 /src/main/java/org/traccar/session
parentf93d28f8677e646eea0ac319e9aa3dcc47194bac (diff)
downloadtrackermap-server-f3f12a2ff295d8e60a87e521d09022a2c09763cf.tar.gz
trackermap-server-f3f12a2ff295d8e60a87e521d09022a2c09763cf.tar.bz2
trackermap-server-f3f12a2ff295d8e60a87e521d09022a2c09763cf.zip
Use is empty
Diffstat (limited to 'src/main/java/org/traccar/session')
-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 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);