mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-01 08:12:14 +00:00
SEC-458: implementy hashCode() in PrincipalSid and GrantedAuthoritySid.
This commit is contained in:
parent
d79d55c8b6
commit
0efa5c3090
@ -57,6 +57,10 @@ public class GrantedAuthoritySid implements Sid {
|
||||
return ((GrantedAuthoritySid) object).getGrantedAuthority().equals(this.getGrantedAuthority());
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.getGrantedAuthority().hashCode();
|
||||
}
|
||||
|
||||
public String getGrantedAuthority() {
|
||||
return grantedAuthority;
|
||||
}
|
||||
|
@ -62,6 +62,10 @@ public class PrincipalSid implements Sid {
|
||||
return ((PrincipalSid) object).getPrincipal().equals(this.getPrincipal());
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.getPrincipal().hashCode();
|
||||
}
|
||||
|
||||
public String getPrincipal() {
|
||||
return principal;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user