mirror of https://github.com/apache/jclouds.git
Forcing User to default to empty set of Roles
This commit is contained in:
parent
7033076f00
commit
fc2d949ae2
|
@ -98,11 +98,17 @@ public class User implements Comparable<User> {
|
|||
protected final String name;
|
||||
protected final Set<Role> roles;
|
||||
|
||||
public User(String id, String name, Set<Role> roles) {
|
||||
protected User(String id, String name, Set<Role> roles) {
|
||||
this.id = checkNotNull(id, "id");
|
||||
this.name = checkNotNull(name, "name");
|
||||
this.roles = ImmutableSet.copyOf(checkNotNull(roles, "roles"));
|
||||
}
|
||||
|
||||
protected User() {
|
||||
id = null;
|
||||
name = null;
|
||||
roles = ImmutableSet.of();
|
||||
}
|
||||
|
||||
/**
|
||||
* When providing an ID, it is assumed that the user exists in the current OpenStack deployment
|
||||
|
|
Loading…
Reference in New Issue