diff --git a/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java b/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java index 4572805d58..da54a33f7a 100644 --- a/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java +++ b/core/src/main/java/org/acegisecurity/acls/sid/GrantedAuthoritySid.java @@ -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; } diff --git a/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java b/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java index 59952aac41..4d7223fbde 100644 --- a/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java +++ b/core/src/main/java/org/acegisecurity/acls/sid/PrincipalSid.java @@ -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; }