directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1748341 - /directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/api/ldap/aci/protectedItem/AbstractAttributeTypeProtectedItem.java
Date Tue, 14 Jun 2016 00:03:55 GMT
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;
     }
 



Mime
View raw message