directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r481603 - in /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core: DefaultDirectoryService.java DirectoryService.java
Date Sat, 02 Dec 2006 19:01:25 GMT
Author: akarasulu
Date: Sat Dec  2 11:01:23 2006
New Revision: 481603

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

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryService.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=481603&r1=481602&r2=481603
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Sat Dec  2 11:01:23 2006
@@ -79,7 +79,7 @@
     private DirectoryServiceListener serviceListener;
 
     /** the initial context environment that fired up the backend subsystem */
-    private Hashtable environment;
+    private Hashtable<String, Object> environment;
 
     /** the configuration */
     private StartupConfiguration startupConfiguration;
@@ -137,7 +137,7 @@
             return new DeadContext();
         }
 
-        Hashtable environment = getEnvironment();
+        Hashtable<String, Object> environment = getEnvironment();
         environment.remove( Context.SECURITY_PRINCIPAL );
         environment.remove( Context.SECURITY_CREDENTIALS );
         environment.remove( Context.SECURITY_AUTHENTICATION );
@@ -171,6 +171,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     public synchronized void startup( DirectoryServiceListener listener, Hashtable env )
throws NamingException
     {
         if ( started )
@@ -178,7 +179,7 @@
             return;
         }
 
-        Hashtable envCopy = ( Hashtable ) env.clone();
+        Hashtable<String,Object> envCopy = ( Hashtable ) env.clone();
 
         StartupConfiguration cfg = ( StartupConfiguration ) Configuration.toConfiguration(
env );
 
@@ -295,7 +296,8 @@
     }
 
 
-    public Hashtable getEnvironment()
+    @SuppressWarnings("unchecked")
+    public Hashtable<String, Object> getEnvironment()
     {
         return ( Hashtable ) environment.clone();
     }
@@ -752,7 +754,7 @@
         }
 
         globalRegistries = new GlobalRegistries( bootstrapRegistries );
-        Set binaries = new HashSet();
+        Set<String> binaries = new HashSet<String>();
         if ( this.environment.containsKey( BINARY_KEY ) )
         {
             if ( log.isInfoEnabled() )

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryService.java?view=diff&rev=481603&r1=481602&r2=481603
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DirectoryService.java
Sat Dec  2 11:01:23 2006
@@ -44,7 +44,7 @@
  */
 public abstract class DirectoryService
 {
-    private static final Map instances = new HashMap();
+    private static final Map<String, DirectoryService> instances = new HashMap<String,
DirectoryService>();
 
 
     /**
@@ -77,9 +77,9 @@
     /**
      * Returns all instances of instantiated {@link DirectoryService}.
      */
-    public synchronized static Set getAllInstances()
+    public synchronized static Set<DirectoryService> getAllInstances()
     {
-        return new HashSet( instances.values() );
+        return new HashSet<DirectoryService>( instances.values() );
     }
 
 



Mime
View raw message