aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-28 11:29:12 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-28 11:29:12 -0700
commitbcd8d095de5e5b99dec3420ddd91419a0a3ba238 (patch)
treea123b2e3b5556cfb93f392ed6dda129c8a60a898 /src/main/java/org/traccar
parent56af285413c2337079332f303f7d091d65f09c4e (diff)
downloadtrackermap-server-bcd8d095de5e5b99dec3420ddd91419a0a3ba238.tar.gz
trackermap-server-bcd8d095de5e5b99dec3420ddd91419a0a3ba238.tar.bz2
trackermap-server-bcd8d095de5e5b99dec3420ddd91419a0a3ba238.zip
Fix duplicated report devices
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/reports/ReportUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/reports/ReportUtils.java b/src/main/java/org/traccar/reports/ReportUtils.java
index 58674beae..23646c4d6 100644
--- a/src/main/java/org/traccar/reports/ReportUtils.java
+++ b/src/main/java/org/traccar/reports/ReportUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2016 - 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,6 +48,7 @@ import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -83,7 +84,7 @@ public final class ReportUtils {
}
public static Collection<Long> getDeviceList(Collection<Long> deviceIds, Collection<Long> groupIds) {
- Collection<Long> result = new ArrayList<>(deviceIds);
+ Collection<Long> result = new LinkedHashSet<>(deviceIds);
for (long groupId : groupIds) {
result.addAll(Context.getPermissionsManager().getGroupDevices(groupId));
}