You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/12/19 03:17:25 UTC
[2/2] git commit: CAMEL-7077 Fixed the same issue in the FtpsEndpoint
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/5c65c6ad
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5c65c6ad
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5c65c6ad
Branch: refs/heads/camel-2.11.x
Commit: 5c65c6ada9ff57694259211ae5cb213d24efda0f
Parents: 524a033
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Dec 19 10:14:59 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Dec 19 10:17:03 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/5c65c6ad/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) {