Updated Branches: refs/heads/camel-2.11.x 524a033a0 -> 5c65c6ada refs/heads/camel-2.12.x a42131762 -> a862680c1
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/a862680c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a862680c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a862680c Branch: refs/heads/camel-2.12.x Commit: a862680c14328a5b9768546d3a772efb4773b236 Parents: a421317 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Thu Dec 19 10:14:59 2013 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Thu Dec 19 10:16:55 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/a862680c/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) {