[Major] Renamed UserRep.clone() to .getCopy()

This commit is contained in:
Robert von Burg 2023-04-05 21:38:33 +02:00
parent d6ab8119a7
commit 939a52f456
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
2 changed files with 3 additions and 4 deletions

View File

@ -407,7 +407,7 @@ public class DefaultPrivilegeHandler implements PrivilegeHandler {
throw new PrivilegeModelException(format(msg, userRepParam.getUsername()));
}
UserRep userRep = userRepParam.clone();
UserRep userRep = userRepParam.getCopy();
// set userId
userRep.setUserId(getUniqueId());
@ -477,7 +477,7 @@ public class DefaultPrivilegeHandler implements PrivilegeHandler {
List<User> toUpdate = new ArrayList<>();
for (UserRep e : userReps) {
UserRep userRep = e.clone();
UserRep userRep = e.getCopy();
User user;
User existingUser = this.persistenceHandler.getUser(userRep.getUsername());

View File

@ -381,8 +381,7 @@ public class UserRep implements Serializable {
return this.username.equals(other.username);
}
@Override
public UserRep clone() {
public UserRep getCopy() {
Set<String> roles = new HashSet<>(this.roles);
Map<String, String> propertyMap = this.properties == null ? null : new HashMap<>(this.properties);