From bcd8d095de5e5b99dec3420ddd91419a0a3ba238 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 28 May 2022 11:29:12 -0700 Subject: Fix duplicated report devices --- src/main/java/org/traccar/reports/ReportUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/reports') 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 getDeviceList(Collection deviceIds, Collection groupIds) { - Collection result = new ArrayList<>(deviceIds); + Collection result = new LinkedHashSet<>(deviceIds); for (long groupId : groupIds) { result.addAll(Context.getPermissionsManager().getGroupDevices(groupId)); } -- cgit v1.2.3