GUAC-1170: Use checked versions of empty list/set/map.

This commit is contained in:
Michael Jumper
2015-04-26 13:56:57 -07:00
parent b74c05b9f7
commit 51e9ff77e5
12 changed files with 15 additions and 15 deletions

View File

@@ -65,7 +65,7 @@ public class CredentialsInfo {
* CredentialsInfo object which describes empty credentials. No parameters
* are required.
*/
public static final CredentialsInfo EMPTY = new CredentialsInfo(Collections.EMPTY_LIST);
public static final CredentialsInfo EMPTY = new CredentialsInfo(Collections.<Parameter>emptyList());
/**
* CredentialsInfo object which describes standard username/password

View File

@@ -117,7 +117,7 @@ public class SimpleConnection extends AbstractConnection {
@Override
public List<ConnectionRecord> getHistory() throws GuacamoleException {
return Collections.EMPTY_LIST;
return Collections.<ConnectionRecord>emptyList();
}
}

View File

@@ -45,7 +45,7 @@ public class SimpleDirectory<ObjectType> implements Directory<ObjectType> {
/**
* The Map of objects to provide access to.
*/
private Map<String, ObjectType> objects = Collections.EMPTY_MAP;
private Map<String, ObjectType> objects = Collections.<String, ObjectType>emptyMap();
/**
* Creates a new empty SimpleDirectory which does not provide access to

View File

@@ -42,7 +42,7 @@ public class SimpleObjectPermissionSet implements ObjectPermissionSet {
/**
* The set of all permissions currently granted.
*/
private Set<ObjectPermission> permissions = Collections.EMPTY_SET;
private Set<ObjectPermission> permissions = Collections.<ObjectPermission>emptySet();
/**
* Creates a new empty SimpleObjectPermissionSet.

View File

@@ -40,7 +40,7 @@ public class SimpleSystemPermissionSet implements SystemPermissionSet {
/**
* The set of all permissions currently granted.
*/
private Set<SystemPermission> permissions = Collections.EMPTY_SET;
private Set<SystemPermission> permissions = Collections.<SystemPermission>emptySet();
/**
* Creates a new empty SimpleSystemPermissionSet.

View File

@@ -126,7 +126,7 @@ public class SimpleUserContext implements UserContext {
// Add root group that contains only the given configurations
this.rootGroup = new SimpleConnectionGroup(
ROOT_IDENTIFIER, ROOT_IDENTIFIER,
connectionIdentifiers, Collections.EMPTY_LIST
connectionIdentifiers, Collections.<String>emptyList()
);
// Build new user from credentials