Polish gh-13290

Issue gh-12533
This commit is contained in:
Steve Riesenberg
2023-06-13 14:07:31 -05:00
parent 4def405067
commit 1f04baa4a3
2 changed files with 26 additions and 21 deletions

View File

@@ -441,8 +441,7 @@ public class User implements UserDetails, CredentialsContainer {
*/
public UserBuilder authorities(Collection<? extends GrantedAuthority> authorities) {
Assert.notNull(authorities, "authorities cannot be null");
this.authorities.clear();
this.authorities.addAll(authorities);
this.authorities = new ArrayList<>(authorities);
return this;
}