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 2007/08/16 23:31:47 UTC

svn commit: r566864 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeService.java

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<String> exclusions = new HashSet<String>();
         
         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<AttributeType> allSuperTypes = new HashSet<AttributeType>();
         AttributeType superType = id;
+        
         while ( superType != null )
         {
             superType = superType.getSuperior();
+            
             if ( superType != null )
             {
                 allSuperTypes.add( superType );