[jboss-svn-commits] JBL Code SVN: r8747 - labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Jan 7 06:18:26 EST 2007
Author: mark.little at jboss.com
Date: 2007-01-07 06:18:25 -0500 (Sun, 07 Jan 2007)
New Revision: 8747
Modified:
labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java
Log:
updated for http://jira.jboss.com/jira/browse/JBESB-337
Modified: labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java 2007-01-07 11:17:17 UTC (rev 8746)
+++ labs/jbossesb/trunk/product/core/rosetta/tests/src/org/jboss/internal/soa/esb/couriers/tests/FtpFileHandlerIntegrationTest.java 2007-01-07 11:18:25 UTC (rev 8747)
@@ -214,7 +214,12 @@
File[] files = handler.getFileList();
- System.err.println("Received information on "+files.length+" files");
+ System.err.print("Received information on ");
+
+ if (files != null)
+ System.err.println(files.length+" files");
+ else
+ System.err.println("zero files");
}
catch (Exception ex)
{
@@ -240,15 +245,26 @@
File[] files = handler.getFileList();
- if (files.length > 0)
+ if ((files != null) && (files.length > 0))
{
System.err.println("Getting file "+files[0]);
+ /*
+ * This may return files within subdirectories. Unfortunately
+ * the FTP Courier doesn't cope with them. At least it now
+ * ignores them safely.
+ */
+
byte[] contents = handler.getFileContents(files[0]);
- String theFile = new String(contents);
-
- System.err.println("Received:\n"+theFile);
+ if (contents != null)
+ {
+ String theFile = new String(contents);
+
+ System.err.println("Received:\n"+theFile);
+ }
+ else
+ System.err.println("Received: no file contents. Probably a directory.");
}
else
System.err.println("No files on remote server.");
More information about the jboss-svn-commits
mailing list