aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-07-27 09:37:40 +0500
committerAbyss777 <abyss@fox5.ru>2017-07-27 09:37:40 +0500
commit49fa4893269b1732806f7176c279742291e02edf (patch)
tree19d23669e9cf0d438078d01ad4909602fb44e622 /src
parentd31f68d80a8e3ae75fa0c2f02b9ca258486a3cad (diff)
downloadtrackermap-server-49fa4893269b1732806f7176c279742291e02edf.tar.gz
trackermap-server-49fa4893269b1732806f7176c279742291e02edf.tar.bz2
trackermap-server-49fa4893269b1732806f7176c279742291e02edf.zip
Remove group typecast
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/database/GroupsManager.java5
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());
}
}