diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-22 11:34:57 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-22 11:34:57 -0800 |
commit | deb519ebd6798450509afaf4067e140edd7eb0d0 (patch) | |
tree | e93d94d51245355e2b43c3cb3aedc77e169f0f09 /src/main/java/org/traccar/database/GroupsManager.java | |
parent | cb25fe3e58c0876fe6c000a1f0a7c7435e3fb0e1 (diff) | |
download | trackermap-server-deb519ebd6798450509afaf4067e140edd7eb0d0.tar.gz trackermap-server-deb519ebd6798450509afaf4067e140edd7eb0d0.tar.bz2 trackermap-server-deb519ebd6798450509afaf4067e140edd7eb0d0.zip |
Fix concurrency issues
Diffstat (limited to 'src/main/java/org/traccar/database/GroupsManager.java')
-rw-r--r-- | src/main/java/org/traccar/database/GroupsManager.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/database/GroupsManager.java b/src/main/java/org/traccar/database/GroupsManager.java index d8404c614..81f1968aa 100644 --- a/src/main/java/org/traccar/database/GroupsManager.java +++ b/src/main/java/org/traccar/database/GroupsManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Anton Tananaev (anton@traccar.org) + * Copyright 2017 - 2020 Anton Tananaev (anton@traccar.org) * Copyright 2017 Andrey Kunitsyn (andrey@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -95,8 +95,7 @@ public class GroupsManager extends BaseObjectManager<Group> implements Managable @Override public Set<Long> getManagedItems(long userId) { - Set<Long> result = new HashSet<>(); - result.addAll(getUserItems(userId)); + Set<Long> result = getUserItems(userId); for (long managedUserId : Context.getUsersManager().getUserItems(userId)) { result.addAll(getUserItems(managedUserId)); } |