Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 25473 invoked from network); 20 May 2010 23:12:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 May 2010 23:12:31 -0000 Received: (qmail 6340 invoked by uid 500); 20 May 2010 23:12:31 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 6291 invoked by uid 500); 20 May 2010 23:12:30 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 6284 invoked by uid 99); 20 May 2010 23:12:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 23:12:30 +0000 X-ASF-Spam-Status: No, hits=-1448.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 May 2010 23:12:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 74BE923889E1; Thu, 20 May 2010 23:12:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r946816 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java Date: Thu, 20 May 2010 23:12:10 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100520231210.74BE923889E1@eris.apache.org> Author: elecharny Date: Thu May 20 23:12:10 2010 New Revision: 946816 URL: http://svn.apache.org/viewvc?rev=946816&view=rev Log: Fixed an infinite loop on the hashCode() method. Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java?rev=946816&r1=946815&r2=946816&view=diff ============================================================================== --- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java (original) +++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/ObjectClass.java Thu May 20 23:12:10 2010 @@ -909,34 +909,9 @@ public class ObjectClass extends Abstrac public int hashCode() { int hash = 37; - - hash = hash * 17 + super.hashCode(); - hash = hash * 17 + objectClassType.hashCode(); - hash = hash * 17 + superiorOids.size(); - // Order doesn't matters, thus just add the hashCode - for ( String oid : superiorOids ) - { - hash = hash + oid.hashCode(); - } - hash = hash * 17 + superiors.size(); - // Order doesn't matters, thus just add the hashCode - for ( ObjectClass oid : superiors ) - { - hash = hash + oid.hashCode(); - } - hash = hash * 17 + mayAttributeTypeOids.size(); - // Order doesn't matters, thus just add the hashCode - for ( String oid : mayAttributeTypeOids ) - { - hash = hash + oid.hashCode(); - } - hash = hash * 17 + mayAttributeTypes.size(); - // Order doesn't matters, thus just add the hashCode - for ( AttributeType oid : mayAttributeTypes ) - { - hash = hash + oid.hashCode(); - } - hash = hash * 17 + superiorOids.hashCode(); + + // Th eObjectClass hashcode is entirelly defined by it's OID + hash = hash * 17 + oid.hashCode(); return hash; }