diff --git a/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java b/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java index 2bc641b06..6db608723 100644 --- a/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java +++ b/li.strolch.privilege/src/main/java/li/strolch/privilege/model/UserRep.java @@ -74,8 +74,7 @@ public class UserRep implements Serializable { if (propertyMap != null) { this.properties = new HashMap<>(propertyMap); - if (this.properties.containsKey("")) - this.properties.remove(""); + this.properties.remove(""); } } @@ -345,10 +344,8 @@ public class UserRep implements Serializable { Set roles = new HashSet<>(this.roles); Map propertyMap = this.properties == null ? null : new HashMap<>(this.properties); - UserRep clone = new UserRep(this.userId, this.username, this.firstname, this.lastname, this.userState, roles, + return new UserRep(this.userId, this.username, this.firstname, this.lastname, this.userState, roles, this.locale, propertyMap); - - return clone; } public T accept(PrivilegeElementVisitor visitor) {