camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-7077 Fixed the same issue in the FtpsEndpoint
Date Thu, 19 Dec 2013 02:15:13 GMT
Updated Branches:
  refs/heads/master 00077a0aa -> 2cd6cd420


CAMEL-7077 Fixed the same issue in the FtpsEndpoint


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2cd6cd42
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2cd6cd42
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2cd6cd42

Branch: refs/heads/master
Commit: 2cd6cd4209e5056d9c58351b521dc2d5675098c8
Parents: 00077a0
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu Dec 19 10:14:59 2013 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu Dec 19 10:14:59 2013 +0800

----------------------------------------------------------------------
 .../apache/camel/component/file/remote/FtpsEndpoint.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2cd6cd42/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 1b4e6d3..06071a0 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.file.remote;
 import java.io.File;
 import java.io.FileInputStream;
 import java.security.KeyStore;
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.net.ssl.KeyManagerFactory;
@@ -154,17 +155,18 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
         dataTimeout = getConfiguration().getTimeout();
 
         if (ftpClientParameters != null) {
+            Map<String, Object> localParameters = new HashMap<String, Object>(ftpClientParameters);
             // setting soTimeout has to be done later on FTPClient (after it has connected)
-            Object timeout = ftpClientParameters.remove("soTimeout");
+            Object timeout = localParameters.remove("soTimeout");
             if (timeout != null) {
                 soTimeout = getCamelContext().getTypeConverter().convertTo(int.class, timeout);
             }
             // and we want to keep data timeout so we can log it later
-            timeout = ftpClientParameters.remove("dataTimeout");
+            timeout = localParameters.remove("dataTimeout");
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            setProperties(client, ftpClientParameters);
+            setProperties(client, localParameters);
         }
 
         if (ftpClientConfigParameters != null) {
@@ -172,7 +174,8 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            setProperties(ftpClientConfig, ftpClientConfigParameters);
+            Map<String, Object> localConfigParameters = new HashMap<String, Object>(ftpClientConfigParameters);
+            setProperties(ftpClientConfig, localConfigParameters);
         }
 
         if (dataTimeout > 0) {


Mime
View raw message