You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2006/03/15 20:36:16 UTC
svn commit: r386150 - in
/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp:
FTPClientWrapper.java FtpClient.java FtpClientFactory.java FtpFileObject.java
Author: imario
Date: Wed Mar 15 11:36:15 2006
New Revision: 386150
URL: http://svn.apache.org/viewcvs?rev=386150&view=rev
Log:
PR: 36157
get rid of deprecation warning
Thanks to Jacob Kjome for pointing this out
Modified:
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java?rev=386150&r1=386149&r2=386150&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FTPClientWrapper.java Wed Mar 15 11:36:15 2006
@@ -92,16 +92,16 @@
}
}
- public FTPFile[] listFiles(String key, String relPath) throws IOException
+ public FTPFile[] listFiles(String relPath) throws IOException
{
try
{
- return getFtpClient().listFiles(key, relPath);
+ return getFtpClient().listFiles(relPath);
}
catch (IOException e)
{
disconnect();
- return getFtpClient().listFiles(key, relPath);
+ return getFtpClient().listFiles(relPath);
}
}
Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClient.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClient.java?rev=386150&r1=386149&r2=386150&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClient.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClient.java Wed Mar 15 11:36:15 2006
@@ -31,7 +31,7 @@
void disconnect() throws IOException;
- FTPFile[] listFiles(String key, String relPath) throws IOException;
+ FTPFile[] listFiles(String relPath) throws IOException;
boolean removeDirectory(String relPath) throws IOException;
Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java?rev=386150&r1=386149&r2=386150&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java Wed Mar 15 11:36:15 2006
@@ -17,6 +17,7 @@
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
+import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.FTPReply;
import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
import org.apache.commons.vfs.FileSystemException;
@@ -56,6 +57,12 @@
{
final FTPClient client = new FTPClient();
+ String key = FtpFileSystemConfigBuilder.getInstance().getEntryParser(fileSystemOptions);
+ if (key != null)
+ {
+ client.configure(new FTPClientConfig(key));
+ }
+
FTPFileEntryParserFactory myFactory = FtpFileSystemConfigBuilder.getInstance().getEntryParserFactory(fileSystemOptions);
if (myFactory != null)
{
Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java?rev=386150&r1=386149&r2=386150&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/ftp/FtpFileObject.java Wed Mar 15 11:36:15 2006
@@ -116,8 +116,7 @@
final FtpClient client = ftpFs.getClient();
try
{
- String key = FtpFileSystemConfigBuilder.getInstance().getEntryParser(getFileSystem().getFileSystemOptions());
- final FTPFile[] tmpChildren = client.listFiles(key, relPath);
+ final FTPFile[] tmpChildren = client.listFiles(relPath);
if (tmpChildren == null || tmpChildren.length == 0)
{
children = EMPTY_FTP_FILE_MAP;
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org