X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fusermanager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2Finternal%2FUserConfig.java;fp=opendaylight%2Fusermanager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fusermanager%2Finternal%2FUserConfig.java;h=176af3a3e4d1d48ed9b8120f65b7bc5a6bca9ffb;hp=c7ddd4a6ecfd2918508924fe0fc78be2339268eb;hb=e2f7aaa41e482815ca1d4495eb85c8653cd903ab;hpb=541d0a36997f292bb037a2199463431eee538358 diff --git a/opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/internal/UserConfig.java b/opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/internal/UserConfig.java index c7ddd4a6ec..176af3a3e4 100644 --- a/opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/internal/UserConfig.java +++ b/opendaylight/usermanager/src/main/java/org/opendaylight/controller/usermanager/internal/UserConfig.java @@ -49,7 +49,7 @@ public class UserConfig implements Serializable { this.roles = (roles == null) ? new ArrayList() : new ArrayList(roles); } - + public String getUser() { return user; } @@ -161,24 +161,24 @@ public class UserConfig implements Serializable { return new Status(StatusCode.BADREQUEST, "Current password is incorrect"); } - + // Create a new object with the proposed modifications UserConfig proposed = new UserConfig(); proposed.user = this.user; proposed.password = (newPassword != null)? newPassword : this.password; proposed.roles = (newRoles != null)? newRoles : this.roles; - + // Validate it Status status = proposed.validate(); if (!status.isSuccess()) { return status; } - + // Accept the modifications this.user = proposed.user; this.password = proposed.password; this.roles = new ArrayList(proposed.roles); - + return status; } @@ -192,7 +192,7 @@ public class UserConfig implements Serializable { } return locResponse; } - + protected String getRolesString() { StringBuffer buffer = new StringBuffer(); if (!roles.isEmpty()) {