directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r481596 - in /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core: configuration/ partition/ partition/impl/btree/
Date Sat, 02 Dec 2006 18:36:03 GMT
Author: akarasulu
Date: Sat Dec  2 10:36:02 2006
New Revision: 481596

URL: http://svn.apache.org/viewvc?view=rev&rev=481596
Log:
added generics to avoid eclipse warnings

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/configuration/PartitionConfiguration.java
Sat Dec  2 10:36:02 2006
@@ -89,7 +89,8 @@
     /**
      * Returns the set of attribute type strings to create an index on.
      */
-    public Set getIndexedAttributes()
+    @SuppressWarnings("unchecked")
+    public Set<String> getIndexedAttributes()
     {
         return ConfigurationUtil.getClonedSet( indexedAttributes );
     }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/AbstractPartition.java
Sat Dec  2 10:36:02 2006
@@ -229,7 +229,7 @@
      */
     public void modify( LdapDN name, int modOp, Attributes mods ) throws NamingException
     {
-        List items = new ArrayList( mods.size() );
+        List<ModificationItem> items = new ArrayList<ModificationItem>( mods.size()
);
         NamingEnumeration e = mods.getAll();
         while ( e.hasMore() )
         {
@@ -237,7 +237,7 @@
         }
 
         ModificationItem[] itemsArray = new ModificationItem[items.size()];
-        itemsArray = ( ModificationItem[] ) items.toArray( itemsArray );
+        itemsArray = items.toArray( itemsArray );
         modify( name, itemsArray );
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sat Dec  2 10:36:02 2006
@@ -111,7 +111,7 @@
     private Partition system;
 
     /** the backends keyed by normalized suffix strings */
-    private HashMap partitions = new HashMap();
+    private Map<String, Partition> partitions = new HashMap<String, Partition>();
 
     /** the read only rootDSE attributes */
     private final Attributes rootDSE;
@@ -196,7 +196,7 @@
         this.attrRegistry = this.factoryCfg.getGlobalRegistries().getAttributeTypeRegistry();
         this.oidRegistry = this.factoryCfg.getGlobalRegistries().getOidRegistry();
         
-        List initializedPartitionCfgs = new ArrayList();
+        List<PartitionConfiguration> initializedPartitionCfgs = new ArrayList<PartitionConfiguration>();
         initializedPartitionCfgs.add( initializeSystemPartition() );
 
         Iterator i = factoryCfg.getStartupConfiguration().getContextPartitionConfigurations().iterator();
@@ -278,8 +278,8 @@
             }
             
             // add all attribute oids of index configs to a hashset
-            Set indices = systemCfg.getIndexedAttributes();
-            Set indexOids = new HashSet();
+            Set<String> indices = systemCfg.getIndexedAttributes();
+            Set<String> indexOids = new HashSet<String>();
             OidRegistry registry = factoryCfg.getGlobalRegistries().getOidRegistry();
             for ( Iterator ii = indices.iterator(); ii.hasNext(); /**/ )
             {
@@ -334,7 +334,7 @@
             systemCfg.setSuffix( PartitionNexus.SYSTEM_PARTITION_SUFFIX );
     
             // Add indexed attributes for system partition
-            Set indexedSystemAttrs = new HashSet();
+            Set<String> indexedSystemAttrs = new HashSet<String>();
             indexedSystemAttrs.add( Oid.ALIAS );
             indexedSystemAttrs.add( Oid.EXISTANCE );
             indexedSystemAttrs.add( Oid.HIERARCHY );
@@ -389,13 +389,13 @@
             return;
         }
 
-        Iterator suffixes = new HashSet( this.partitions.keySet() ).iterator();
+        Iterator<String> suffixes = new HashSet<String>( this.partitions.keySet()
).iterator();
 
         // make sure this loop is not fail fast so all backing stores can
         // have an attempt at closing down and synching their cached entries
         while ( suffixes.hasNext() )
         {
-            String suffix = ( String ) suffixes.next();
+            String suffix = suffixes.next();
             try
             {
                 removeContextPartition( new LdapDN( suffix ) );
@@ -755,7 +755,7 @@
                 // note if we've seen these special attributes as well.
                 // -----------------------------------------------------------
 
-                Set realIds = new HashSet();
+                Set<String> realIds = new HashSet<String>();
                 boolean containsAsterisk = false;
                 boolean containsPlus = false;
                 boolean containsOneDotOne = false;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexus.java
Sat Dec  2 10:36:02 2006
@@ -98,7 +98,7 @@
         
         try
         {
-        	Map oidsMap = new HashMap();
+        	Map<String, OidNormalizer> oidsMap = new HashMap<String, OidNormalizer>();
         	
         	oidsMap.put( UID_ATTRIBUTE, new OidNormalizer( UID_ATTRIBUTE_OID, new NoOpNormalizer()
) );
         	oidsMap.put( UID_ATTRIBUTE_ALIAS, new OidNormalizer( UID_ATTRIBUTE_OID, new NoOpNormalizer()
) );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/PartitionNexusProxy.java
Sat Dec  2 10:36:02 2006
@@ -86,7 +86,7 @@
 
     static
     {
-        Collection c = new HashSet();
+        Collection<String> c = new HashSet<String>();
         c.add( "normalizationService" );
         c.add( "authenticationService" );
         c.add( "authorizationService" );
@@ -98,7 +98,7 @@
         c.add( "eventService" );
         LOOKUP_BYPASS = Collections.unmodifiableCollection( c );
 
-        c = new HashSet();
+        c = new HashSet<String>();
         c.add( "authenticationService" );
         c.add( "authorizationService" );
         c.add( "defaultAuthorizationService" );
@@ -109,17 +109,17 @@
         c.add( "eventService" );
         GETMATCHEDDN_BYPASS = Collections.unmodifiableCollection( c );
 
-	c = new HashSet();
-	c.add( "normalizationService" );
-	c.add( "authenticationService" );
-	c.add( "authorizationService" );
-	c.add( "defaultAuthorizationService" );
-	c.add( "schemaService" );
-	c.add( "subentryService" );
-	c.add( "referralService" );
-	c.add( "eventService" );
-	c.add( "triggerService" );
-	LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
+    	c = new HashSet<String>();
+    	c.add( "normalizationService" );
+    	c.add( "authenticationService" );
+    	c.add( "authorizationService" );
+    	c.add( "defaultAuthorizationService" );
+    	c.add( "schemaService" );
+    	c.add( "subentryService" );
+    	c.add( "referralService" );
+    	c.add( "eventService" );
+    	c.add( "triggerService" );
+    	LOOKUP_EXCLUDING_OPR_ATTRS_BYPASS = Collections.unmodifiableCollection( c );
     }
 
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=481596&r1=481595&r2=481596
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Sat Dec  2 10:36:02 2006
@@ -24,6 +24,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Set;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -45,7 +46,6 @@
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.util.ArrayUtils;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 import org.slf4j.Logger;
@@ -62,43 +62,6 @@
 {
     private static final Logger log = LoggerFactory.getLogger( BTreePartition.class );
 
-    /** ===================================================================
-
-     The following OID branch is reserved for the directory TLP once it
-     graduates the incubator:
-
-     1.2.6.1.4.1.18060.1.1
-
-     The following branch is reserved for the apache directory server:
-
-     1.2.6.1.4.1.18060.1.1.1
-
-     The following branch is reserved for use by apache directory server Syntaxes:
-
-     1.2.6.1.4.1.18060.1.1.1.1
-
-     The following branch is reserved for use by apache directory server MatchingRules:
-
-     1.2.6.1.4.1.18060.1.1.1.2
-
-     The following branch is reserved for use by apache directory server AttributeTypes:
-
-     1.2.6.1.4.1.18060.1.1.1.3
-
-     * 1.2.6.1.4.1.18060.1.1.1.3.1 - apacheNdn
-     * 1.2.6.1.4.1.18060.1.1.1.3.2 - apacheUpdn
-     * 1.2.6.1.4.1.18060.1.1.1.3.3 - apacheExistance
-     * 1.2.6.1.4.1.18060.1.1.1.3.4 - apacheHierarchy
-     * 1.2.6.1.4.1.18060.1.1.1.3.5 - apacheOneAlias
-     * 1.2.6.1.4.1.18060.1.1.1.3.6 - apacheSubAlias
-     * 1.2.6.1.4.1.18060.1.1.1.3.7 - apacheAlias
-
-     The following branch is reserved for use by apache directory server ObjectClasses:
-
-     1.2.6.1.4.1.18060.1.1.1.4
-
-     ==================================================================== */
-
     /**
      * the search engine used to search the database
      */
@@ -140,7 +103,7 @@
         
         this.searchEngine = new DefaultSearchEngine( this, evaluator, enumerator, optimizer
);
 
-        HashSet sysOidSet = new HashSet();
+        Set<String> sysOidSet = new HashSet<String>();
         sysOidSet.add( Oid.EXISTANCE );
         sysOidSet.add( Oid.HIERARCHY );
         sysOidSet.add( Oid.UPDN );
@@ -150,7 +113,7 @@
         sysOidSet.add( Oid.ALIAS );
 
         // Used to calculate the system indices we must automatically add
-        HashSet customAddedSystemIndices = new HashSet();
+        Set<String> customAddedSystemIndices = new HashSet<String>();
         
         for ( Iterator ii = cfg.getIndexedAttributes().iterator(); ii.hasNext(); /**/ )
         {



Mime
View raw message