commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1083203 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Date Sat, 19 Mar 2011 16:05:16 GMT
Author: sebb
Date: Sat Mar 19 16:05:16 2011
New Revision: 1083203

URL: http://svn.apache.org/viewvc?rev=1083203&view=rev
Log:
NET-382 Don't call getInputStream on _socket_, super class has already done that

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1083203&r1=1083202&r2=1083203&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Sat Mar
19 16:05:16 2011
@@ -731,7 +731,7 @@ implements Configurable
     @Override
     protected void _connectAction_() throws IOException
     {
-        super._connectAction_();
+        super._connectAction_(); // sets up _input_ and _output_
         __initDefaults();
         // must be after super._connectAction_(), because otherwise we get an
         // Exception claiming we're not connected
@@ -743,11 +743,9 @@ implements Configurable
             {
                  setControlEncoding("UTF-8");
                  _controlInput_ =
-                     new BufferedReader(new InputStreamReader(_socket_.getInputStream(),
-                                                            getControlEncoding()));
+                     new BufferedReader(new InputStreamReader(_input_, getControlEncoding()));
                  _controlOutput_ =
-                    new BufferedWriter(new OutputStreamWriter(_socket_.getOutputStream(),
-                                                                            getControlEncoding()));
+                    new BufferedWriter(new OutputStreamWriter(_output_, getControlEncoding()));
             }
             // restore the original reply (server greeting)
             _replyLines.clear();



Mime
View raw message