Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 58381 invoked from network); 11 Sep 2007 22:54:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Sep 2007 22:54:24 -0000 Received: (qmail 94291 invoked by uid 500); 11 Sep 2007 22:54:18 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 94255 invoked by uid 500); 11 Sep 2007 22:54:18 -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 94244 invoked by uid 99); 11 Sep 2007 22:54:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Sep 2007 15:54:18 -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; Tue, 11 Sep 2007 22:54:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DD6461A9832; Tue, 11 Sep 2007 15:54:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070911225403.DD6461A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 env = new Hashtable(); 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 parameters = new HashMap(); + + 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 parameters = new HashMap(); + + 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;