camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r898210 - /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java
Date Tue, 12 Jan 2010 07:53:41 GMT
Author: davsclaus
Date: Tue Jan 12 07:53:40 2010
New Revision: 898210

URL: http://svn.apache.org/viewvc?rev=898210&view=rev
Log:
Fixed NPE issue when FTP server cannot be simulated on the OS/box

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java?rev=898210&r1=898209&r2=898210&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpServerTestSupport.java
Tue Jan 12 07:53:40 2010
@@ -80,10 +80,14 @@
         deleteDirectory(FTP_ROOT_DIR);
 
         canTest = false;
-        ftpServer = createFtpServerFactory().createServer();
-        if (ftpServer != null) {
-            ftpServer.start();
-            canTest = true;
+
+        FtpServerFactory factory = createFtpServerFactory();
+        if (factory != null) {
+            ftpServer = factory.createServer();
+            if (ftpServer != null) {
+                ftpServer.start();
+                canTest = true;
+            }
         }
         
         super.setUp();



Mime
View raw message