Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 29517 invoked from network); 16 Aug 2007 21:32:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Aug 2007 21:32:10 -0000 Received: (qmail 70662 invoked by uid 500); 16 Aug 2007 21:32:08 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 70631 invoked by uid 500); 16 Aug 2007 21:32:08 -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 70620 invoked by uid 99); 16 Aug 2007 21:32:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 14:32:08 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 21:32:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 92BBF1A981C; Thu, 16 Aug 2007 14:31:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r566864 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Date: Thu, 16 Aug 2007 21:31:47 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070816213147.92BBF1A981C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: elecharny Date: Thu Aug 16 14:31:46 2007 New Revision: 566864 URL: http://svn.apache.org/viewvc?view=rev&rev=566864 Log: Fixed potential pb related to DIRSERVER-832. Using generics Minor refactoring Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java?view=diff&rev=566864&r1=566863&r2=566864 ============================================================================== --- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java (original) +++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java Thu Aug 16 14:31:46 2007 @@ -133,13 +133,13 @@ * OID values in the exclusions set instead of regular names that * may have case variance. */ - Attribute collectiveExclusions = entry.get( "collectiveExclusions" ); + Attribute collectiveExclusions = entry.get( SchemaConstants.COLLECTIVE_EXCLUSIONS_AT ); Set exclusions = new HashSet(); if ( collectiveExclusions != null ) { if ( AttributeUtils.containsValueCaseIgnore( collectiveExclusions, EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES_OID ) - || collectiveExclusions.contains( EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES ) ) + || AttributeUtils.containsValue( collectiveExclusions, EXCLUDE_ALL_COLLECTIVE_ATTRIBUTES, attrTypeRegistry.lookup( SchemaConstants.COLLECTIVE_EXCLUSIONS_AT_OID ) ) ) { /* * This entry does not allow any collective attributes @@ -262,11 +262,13 @@ private Set getAllSuperTypes( AttributeType id ) throws NamingException { - Set allSuperTypes = new HashSet(); + Set allSuperTypes = new HashSet(); AttributeType superType = id; + while ( superType != null ) { superType = superType.getSuperior(); + if ( superType != null ) { allSuperTypes.add( superType );