commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: [net] Found and fixed a bug in FTPClient class in Commons Net project.
Date Fri, 08 Jul 2005 08:08:31 GMT

In message <OF70B962D2.CAE4E06C-ON88257037.00544E54-88257037.00547B02@idx.com>,
 Bing_Wu@idx.com writes:
>I downloaded the source code and found the problem. It's in getSystemName 
>method of FTPClient class in Commons Net project. The reason is that for 
>some system, such as HP's NonStop (Tandem) platform, "SYST" command is not 
>understood, so __systemName will be null thus causing the error above.

The proper place to handle this would be in the caller to getSystemName,
otherwise you will never be able to know that the system name is
unknown.  The documentaton for getSystemName() says:
  * @return The system type name obtained from the server.  null if the
  *       information could not be obtained.

In other words, it is intended to return null.  It is up to the caller
to decide what to do with the information.  If there's a need for a change,
I would suggest making it higher up in the call chain.  Steve would
know best if there's any need.  My guess is that the intent is for
API users to catch that ParserInitializationException and select a
default parser according their needs instead of having Commons Net
make the decision for them.

daniel


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