Fixed bugs in ARP caching. Site ARP was not being cached. User ARP was being cached...
[java-idp.git] / src / edu / internet2 / middleware / shibboleth / aa / arp / AAPrincipal.java
index 031a2f9..c8bde2a 100755 (executable)
@@ -77,4 +77,21 @@ public class AAPrincipal implements Principal {
                return principalName;
        }
 
+       /**
+        * @see java.lang.Object#equals(Object)
+        */
+       public boolean equals(Object obj) {
+               if (!(obj instanceof AAPrincipal)) {
+                       return false;
+               }
+               return ((AAPrincipal) obj).getName().equals(getName());
+       }
+
+       /**
+        * @see java.lang.Object#hashCode()
+        */
+       public int hashCode() {
+               return "AAPrincipal".hashCode() + principalName.hashCode();
+       }
+
 }