oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From good...@apache.org
Subject svn commit: r1540208 - /oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java
Date Fri, 08 Nov 2013 22:16:29 GMT
Author: goodale
Date: Fri Nov  8 22:16:29 2013
New Revision: 1540208

URL: http://svn.apache.org/r1540208
Log:
OODT-659:  Remove excessive pwd calls to the FTP server within an ls() call

Modified:
    oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java

Modified: oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java
URL: http://svn.apache.org/viewvc/oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java?rev=1540208&r1=1540207&r2=1540208&view=diff
==============================================================================
--- oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java
(original)
+++ oodt/trunk/protocol/ftp/src/main/java/org/apache/oodt/cas/protocol/ftp/CommonsNetFtpProtocol.java
Fri Nov  8 22:16:29 2013
@@ -102,13 +102,13 @@ public class CommonsNetFtpProtocol imple
 
 	public List<ProtocolFile> ls() throws ProtocolException {
 		try {
+      String path = this.pwd().getPath();
 			FTPFile[] files = ftp.listFiles();
 			List<ProtocolFile> returnFiles = new LinkedList<ProtocolFile>();
 			for (int i = 0; i < files.length; i++) {
 				FTPFile file = files[i];
 				if (file == null)
 					continue;
-				String path = this.pwd().getPath();
 				returnFiles.add(new ProtocolFile(path + "/" + file.getName(), file
 						.isDirectory()));
 			}



Mime
View raw message