You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2005/02/05 13:48:50 UTC
svn commit: r151488 -
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
Author: scohen
Date: Sat Feb 5 04:48:48 2005
New Revision: 151488
URL: http://svn.apache.org/viewcvs?view=rev&rev=151488
Log:
correct initiateListParsing() so that it works in all cases.
Modified:
jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
Modified: jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java?view=diff&r1=151487&r2=151488
==============================================================================
--- jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ jakarta/commons/proper/net/trunk/src/java/org/apache/commons/net/ftp/FTPClient.java Sat Feb 5 04:48:48 2005
@@ -2330,9 +2330,15 @@
// We cache the value to avoid creation of a new object every
// time a file listing is generated.
if(__entryParser == null) {
- // if a null parserKey is supplied, check the
- // configuration to see if one was specified there.
- if (null == parserKey) {
+ if (null != parserKey) {
+ // if a parser key was supplied in the parameters,
+ // use that to create the paraser
+ __entryParser =
+ __parserFactory.createFileEntryParser(parserKey);
+
+ } else {
+ // if no parserKey was supplied, check for a configuration
+ // in the params, and if non-null, use that.
if (null != __configuration) {
__entryParser =
__parserFactory.createFileEntryParser(__configuration);
@@ -2340,11 +2346,9 @@
// if a parserKey hasn't been supplied, and a configuration
// hasn't been supplied, then autodetect by calling
// the SYST command and use that to choose the parser.
- parserKey = getSystemName();
-
- }
- } else {
- __entryParser = __parserFactory.createFileEntryParser(parserKey);
+ __entryParser =
+ __parserFactory.createFileEntryParser(getSystemName());
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org