Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5224810236 for ; Thu, 19 Dec 2013 02:17:25 +0000 (UTC) Received: (qmail 83670 invoked by uid 500); 19 Dec 2013 02:17:25 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 83636 invoked by uid 500); 19 Dec 2013 02:17:25 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 83629 invoked by uid 99); 19 Dec 2013 02:17:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 02:17:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0018CE23F; Thu, 19 Dec 2013 02:17:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Date: Thu, 19 Dec 2013 02:17:24 -0000 Message-Id: <714ad9b79c4f44aaaaf426cde7ad2640@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: CAMEL-7077 Fixed the same issue in the FtpsEndpoint 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 Authored: Thu Dec 19 10:14:59 2013 +0800 Committer: Willem Jiang 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 { dataTimeout = getConfiguration().getTimeout(); if (ftpClientParameters != null) { + Map localParameters = new HashMap(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 { if (ftpClientConfig == null) { ftpClientConfig = new FTPClientConfig(); } - setProperties(ftpClientConfig, ftpClientConfigParameters); + Map localConfigParameters = new HashMap(ftpClientConfigParameters); + setProperties(ftpClientConfig, localConfigParameters); } if (dataTimeout > 0) {