From 7abf8b8605f00c1a477dbd6eeb58bf5e678ff66b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 22 Oct 2018 05:44:36 +0400 Subject: Remove unnecessary code --- src/org/traccar/database/PermissionsManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java index d9ab93557..ced0df1c0 100644 --- a/src/org/traccar/database/PermissionsManager.java +++ b/src/org/traccar/database/PermissionsManager.java @@ -66,21 +66,21 @@ public class PermissionsManager { public Set getGroupPermissions(long userId) { if (!groupPermissions.containsKey(userId)) { - groupPermissions.put(userId, new HashSet()); + groupPermissions.put(userId, new HashSet<>()); } return groupPermissions.get(userId); } public Set getDevicePermissions(long userId) { if (!devicePermissions.containsKey(userId)) { - devicePermissions.put(userId, new HashSet()); + devicePermissions.put(userId, new HashSet<>()); } return devicePermissions.get(userId); } private Set getAllDeviceUsers(long deviceId) { if (!deviceUsers.containsKey(deviceId)) { - deviceUsers.put(deviceId, new HashSet()); + deviceUsers.put(deviceId, new HashSet<>()); } return deviceUsers.get(deviceId); } @@ -102,7 +102,7 @@ public class PermissionsManager { public Set getGroupDevices(long groupId) { if (!groupDevices.containsKey(groupId)) { - groupDevices.put(groupId, new HashSet()); + groupDevices.put(groupId, new HashSet<>()); } return groupDevices.get(groupId); } @@ -193,7 +193,7 @@ public class PermissionsManager { } } - public void checkDeviceLimit(long userId) throws SecurityException, SQLException { + public void checkDeviceLimit(long userId) throws SecurityException { int deviceLimit = getUser(userId).getDeviceLimit(); if (deviceLimit != -1) { int deviceCount = 0; -- cgit v1.2.3