Author: sebb
Date: Thu Mar 17 02:51:29 2011
New Revision: 1082382

URL: http://svn.apache.org/viewvc?rev=1082382&view=rev
Log:
Move command listener

Modified:
    commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java

Modified: 
commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java
URL: 
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java?rev=1082382&r1=1082381&r2=1082382&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java 
(original)
+++ commons/proper/net/trunk/src/main/java/examples/ftp/FTPClientExample.java 
Thu Mar 17 02:51:29 2011
@@ -144,8 +144,6 @@ public final class FTPClientExample
         if (controlKeepAliveReplyTimeout >= 0) {
             ftp.setControlKeepAliveReplyTimeout(controlKeepAliveReplyTimeout);
         }
-        ftp.addProtocolCommandListener(new PrintCommandListener(
-                                           new PrintWriter(System.out)));
 
         try
         {
@@ -198,6 +196,8 @@ __main:
 
             System.out.println("Remote system is " + ftp.getSystemType());
 
+            // After authentication
+            ftp.addProtocolCommandListener(new PrintCommandListener(new 
PrintWriter(System.out)));
             if (binaryTransfer)
                 ftp.setFileType(FTP.BINARY_FILE_TYPE);
 


Reply via email to