aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-01-25 20:02:22 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-01-26 08:41:45 +1300
commit8535983fea8c09046c53f2ebf388bbf3fae594ce (patch)
treea9f60c445ea163450b8886f7988853d86088db10 /src/org/traccar/database
parent1c915fa1360f416ec88f4095664a887ceea2bc15 (diff)
downloadtrackermap-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.tar.gz
trackermap-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.tar.bz2
trackermap-server-8535983fea8c09046c53f2ebf388bbf3fae594ce.zip
Clean up unnecessary code
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/ExtendedObjectManager.java2
-rw-r--r--src/org/traccar/database/LdapProvider.java2
-rw-r--r--src/org/traccar/database/PermissionsManager.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/database/ExtendedObjectManager.java b/src/org/traccar/database/ExtendedObjectManager.java
index 16785cb37..c9e349136 100644
--- a/src/org/traccar/database/ExtendedObjectManager.java
+++ b/src/org/traccar/database/ExtendedObjectManager.java
@@ -95,7 +95,7 @@ public abstract class ExtendedObjectManager<T extends BaseModel> extends SimpleO
long groupId = device.getGroupId();
while (groupId != 0) {
getAllDeviceItems(device.getId()).addAll(getGroupItems(groupId));
- Group group = (Group) Context.getGroupsManager().getById(groupId);
+ Group group = Context.getGroupsManager().getById(groupId);
if (group != null) {
groupId = group.getGroupId();
} else {
diff --git a/src/org/traccar/database/LdapProvider.java b/src/org/traccar/database/LdapProvider.java
index 2c4b7ceb1..44dd386ed 100644
--- a/src/org/traccar/database/LdapProvider.java
+++ b/src/org/traccar/database/LdapProvider.java
@@ -115,7 +115,7 @@ public class LdapProvider {
SearchResult searchResult = null;
if (results.hasMoreElements()) {
- searchResult = (SearchResult) results.nextElement();
+ searchResult = results.nextElement();
if (results.hasMoreElements()) {
Log.warning("Matched multiple users for the accountName: " + accountName);
return null;
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 60bda99ce..3ae5961ce 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -57,7 +57,7 @@ public class PermissionsManager {
}
public User getUser(long userId) {
- return (User) usersManager.getById(userId);
+ return usersManager.getById(userId);
}
public Set<Long> getGroupPermissions(long userId) {