From 49fa4893269b1732806f7176c279742291e02edf Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 27 Jul 2017 09:37:40 +0500 Subject: Remove group typecast --- src/org/traccar/database/GroupsManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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 implements ManagableObjects { @@ -37,14 +36,14 @@ public class GroupsManager extends BaseObjectManager implements Managable DeviceManager.DEFAULT_REFRESH_DELAY) * 1000; } - private void checkGroupCycles(BaseModel group) { + private void checkGroupCycles(Group group) { Set 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()); } } -- cgit v1.2.3