You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2016/06/14 00:03:55 UTC
svn commit: r1748341 -
/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java
Author: elecharny
Date: Tue Jun 14 00:03:55 2016
New Revision: 1748341
URL: http://svn.apache.org/viewvc?rev=1748341&view=rev
Log:
Fixed the wrong Hashcode method
Modified:
directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java
Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java?rev=1748341&r1=1748340&r2=1748341&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java (original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java Tue Jun 14 00:03:55 2016
@@ -66,7 +66,14 @@ public abstract class AbstractAttributeT
public int hashCode()
{
int hash = 37;
- hash = hash * 17 + attributeTypes.hashCode();
+
+ for ( AttributeType attributeType : attributeTypes )
+ {
+ hash = hash * 17 + attributeType.hashCode();
+ }
+
+ hash = hash * 17 + this.getClass().getName().hashCode();
+
return hash;
}