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 76CAA1022F for ; Thu, 19 Dec 2013 02:15:13 +0000 (UTC) Received: (qmail 80180 invoked by uid 500); 19 Dec 2013 02:15:13 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 80136 invoked by uid 500); 19 Dec 2013 02:15:13 -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 80129 invoked by uid 99); 19 Dec 2013 02:15:13 -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:15:13 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1E41AE20F; Thu, 19 Dec 2013 02:15:13 +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 Message-Id: <7980e740223f4a6f8729995b67ca5085@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: CAMEL-7077 Fixed the same issue in the FtpsEndpoint Date: Thu, 19 Dec 2013 02:15:13 +0000 (UTC) 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 Authored: Thu Dec 19 10:14:59 2013 +0800 Committer: Willem Jiang 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 { 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) {