commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Gustavsson <nik...@protocol7.com>
Subject [net] FTP reply list never cleared
Date Fri, 19 Jan 2007 16:30:00 GMT
Hi

When using the net Java 5 branch, the replies returned from the server 
is stored in a list that is not emptied between commands. This means 
that when for example printing the replies with a 
ProtocolCommandListener you will get the full history of replies rather 
than the last one. The following patch seems to work:

Index: src/main/java/org/apache/commons/net/ftp/FTP.java
===================================================================
--- src/main/java/org/apache/commons/net/ftp/FTP.java   (revision 497851)
+++ src/main/java/org/apache/commons/net/ftp/FTP.java   (working copy)
@@ -266,7 +266,7 @@
          int length;

          _newReplyString = true;
-        //_replyLines. setSize(0);
+        _replyLines.clear();

          String line = _controlInput_.readLine();




/niklas


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message