From c8d5374602e9e292f0792578bbe4790bb1666fc7 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Fri, 25 May 2007 02:28:40 +0000 Subject: [PATCH] SEC-436: Add hashCode() methods. --- .../java/org/acegisecurity/acls/domain/BasePermission.java | 4 ++++ .../org/acegisecurity/acls/domain/CumulativePermission.java | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/acegisecurity/acls/domain/BasePermission.java b/core/src/main/java/org/acegisecurity/acls/domain/BasePermission.java index 19d23cedad..68fd6480fa 100644 --- a/core/src/main/java/org/acegisecurity/acls/domain/BasePermission.java +++ b/core/src/main/java/org/acegisecurity/acls/domain/BasePermission.java @@ -161,4 +161,8 @@ public final class BasePermission implements Permission { public String toString() { return "BasePermission[" + getPattern() + "=" + mask + "]"; } + + public int hashCode() { + return this.mask; + } } diff --git a/core/src/main/java/org/acegisecurity/acls/domain/CumulativePermission.java b/core/src/main/java/org/acegisecurity/acls/domain/CumulativePermission.java index 33b2e5e70e..7b6b67e64f 100644 --- a/core/src/main/java/org/acegisecurity/acls/domain/CumulativePermission.java +++ b/core/src/main/java/org/acegisecurity/acls/domain/CumulativePermission.java @@ -56,8 +56,12 @@ public class CumulativePermission implements Permission { return (this.mask == rhs.getMask()); } + + public int hashCode() { + return this.mask; + } - public int getMask() { + public int getMask() { return this.mask; }