diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-27 09:37:40 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-27 09:37:40 +0500 |
commit | 49fa4893269b1732806f7176c279742291e02edf (patch) | |
tree | 19d23669e9cf0d438078d01ad4909602fb44e622 /src/org/traccar | |
parent | d31f68d80a8e3ae75fa0c2f02b9ca258486a3cad (diff) | |
download | trackermap-server-49fa4893269b1732806f7176c279742291e02edf.tar.gz trackermap-server-49fa4893269b1732806f7176c279742291e02edf.tar.bz2 trackermap-server-49fa4893269b1732806f7176c279742291e02edf.zip |
Remove group typecast
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/database/GroupsManager.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/database/GroupsManager.java b/src/org/traccar/database/GroupsManager.java index 20b403d55..c0456085b 100644 --- a/src/org/traccar/database/GroupsManager.java +++ b/src/org/traccar/database/GroupsManager.java @@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicLong; import org.traccar.Context; import org.traccar.helper.Log; -import org.traccar.model.BaseModel; import org.traccar.model.Group; public class GroupsManager extends BaseObjectManager<Group> implements ManagableObjects { @@ -37,14 +36,14 @@ public class GroupsManager extends BaseObjectManager<Group> implements Managable DeviceManager.DEFAULT_REFRESH_DELAY) * 1000; } - private void checkGroupCycles(BaseModel group) { + private void checkGroupCycles(Group group) { Set<Long> groups = new HashSet<>(); while (group != null) { if (groups.contains(group.getId())) { throw new IllegalArgumentException("Cycle in group hierarchy"); } groups.add(group.getId()); - group = getById(((Group) group).getGroupId()); + group = getById(group.getGroupId()); } } |