Fix various code issues as detected by Sonar
Mostly minor changes: - Add deprecated javadoc tag on deprecated members - Reduce duplication (FlatFile, BackupService, ...) - Make methods static - Reduce size of anonymous classes - Replace name with displayName in PermissionsSystemType (avoids confusing with Enum name()) - Tabs to spaces - Merge if statements Code from third-party sources (BCryptService, BinTools, PHPBB) not modified.
This commit is contained in:
@@ -55,7 +55,7 @@ public class BPermissionsHandler implements PermissionHandler {
|
||||
List<String> groups = getGroups(player);
|
||||
|
||||
// Make sure there is any group available, or return null
|
||||
if (groups.size() == 0)
|
||||
if (groups.isEmpty())
|
||||
return null;
|
||||
|
||||
// Return the first group
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PermissionsBukkitHandler implements PermissionHandler {
|
||||
List<String> groups = getGroups(player);
|
||||
|
||||
// Make sure there is any group available, or return null
|
||||
if (groups.size() == 0)
|
||||
if (groups.isEmpty())
|
||||
return null;
|
||||
|
||||
// Return the first group
|
||||
|
||||
@@ -77,7 +77,7 @@ public class PermissionsExHandler implements PermissionHandler {
|
||||
PermissionUser user = permissionManager.getUser(player);
|
||||
|
||||
List<String> groups = user.getParentIdentifiers(null);
|
||||
if (groups.size() == 0)
|
||||
if (groups.isEmpty())
|
||||
return null;
|
||||
|
||||
return groups.get(0);
|
||||
|
||||
Reference in New Issue
Block a user