commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35304] - [net] FTPClient: No reply codes available
Date Fri, 10 Jun 2005 14:26:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35304>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35304





------- Additional Comments From scohen@apache.org  2005-06-10 16:26 -------
(In reply to comment #3)
> Hi Steve, thanx for your quick answer!

> 
> I attached the code snipplet, which
> shows  the unexpected behavior ...

But in the attached snippet, you call getReply(), not getReplyCode(), at least
in the portion of your code that I think you are talking about.  Documentation
for getReply() says:

     * Fetches a reply from the FTP server and returns the integer reply
     * code.  ... Only use this
     * method if you are implementing your own FTP client or if you need to
     * fetch a secondary response from the FTP server.

I believe it must be hanging the client because it's waiting for a reply from
the FTP server that will never come because you haven't sent the server a new
command.  (The command you previously sent has ALREADY had its reply read as
part of the storeFile process).  getReply() is the wrong method to call here.
What you want is getReplyCode(), which simply fetches the previously stored
__replyCode data member that was stored on the previous call to getReply().

If you want to argue that the method names are confusing and possibly not best,
 or that public access might not be right here I won't disagree.  This behavior
is documented, though, in the javadocs, although I believe it could be made a
little stronger.  getReply() should not ordinarily be called in client code such
as that which you are writing.
  



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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