directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r574719 - /directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
Date Tue, 11 Sep 2007 22:54:03 GMT
Author: elecharny
Date: Tue Sep 11 15:54:03 2007
New Revision: 574719

URL: http://svn.apache.org/viewvc?rev=574719&view=rev
Log:
Removed warnings using generic and replaced toURL() by toURI().toURL()

Modified:
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java?rev=574719&r1=574718&r2=574719&view=diff
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/exportcmd/ExportCommandExecutor.java
Tue Sep 11 15:54:03 2007
@@ -320,7 +320,8 @@
             notifyOutputListener( "Base DN: " + baseDN );
             notifyOutputListener( "Authentication: " + auth );
         }
-        Hashtable env = new Hashtable();
+        
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, user );
         env.put( Context.SECURITY_CREDENTIALS, password );
         env.put( Context.SECURITY_AUTHENTICATION, auth );
@@ -354,10 +355,10 @@
 
     private void processParameters( Parameter[] params )
     {
-        Map parameters = new HashMap();
-        for ( int i = 0; i < params.length; i++ )
+        Map<String, Object> parameters = new HashMap<String, Object>();
+        
+        for ( Parameter parameter:params )
         {
-            Parameter parameter = params[i];
             parameters.put( parameter.getName(), parameter.getValue() );
         }
 
@@ -396,7 +397,7 @@
                 ApplicationContext factory = null;
                 URL configUrl;
 
-                configUrl = getLayout().getConfigurationFile().toURL();
+                configUrl = getLayout().getConfigurationFile().toURI().toURL();
                 factory = new FileSystemXmlApplicationContext( configUrl.toString() );
                 setConfiguration( ( ServerStartupConfiguration ) factory.getBean( "configuration"
) );
             }
@@ -566,15 +567,16 @@
 
     private void processListeners( ListenerParameter[] listeners )
     {
-        Map parameters = new HashMap();
-        for ( int i = 0; i < listeners.length; i++ )
+        Map<String, Object> parameters = new HashMap<String, Object>();
+        
+        for ( ListenerParameter parameter:listeners )
         {
-            ListenerParameter parameter = listeners[i];
             parameters.put( parameter.getName(), parameter.getListener() );
         }
 
         // OutputListener param
         ToolCommandListener outputListener = ( ToolCommandListener ) parameters.get( OUTPUTLISTENER_PARAMETER
);
+
         if ( outputListener != null )
         {
             this.outputListener = outputListener;
@@ -582,6 +584,7 @@
 
         // ErrorListener param
         ToolCommandListener errorListener = ( ToolCommandListener ) parameters.get( ERRORLISTENER_PARAMETER
);
+        
         if ( errorListener != null )
         {
             this.errorListener = errorListener;



Mime
View raw message