Skip to content

Commit ea148d5

Browse files
Atryeleftherias
authored andcommitted
Avoid toString in favor of getName for extract sid
There are some more sophisticated implementations of `getName` in `AbstractAuthenticationToken` and other `Authentication` classes.
1 parent b3d177f commit ea148d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

acl/src/main/java/org/springframework/security/acls/domain/PrincipalSid.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public PrincipalSid(Authentication authentication) {
5353
this.principal = ((UserDetails) authentication.getPrincipal()).getUsername();
5454
}
5555
else {
56-
this.principal = authentication.getPrincipal().toString();
56+
this.principal = authentication.getName();
5757
}
5858
}
5959

0 commit comments

Comments
 (0)