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 D422117F70 for ; Tue, 27 Jan 2015 06:39:04 +0000 (UTC) Received: (qmail 44908 invoked by uid 500); 27 Jan 2015 06:39:05 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 44859 invoked by uid 500); 27 Jan 2015 06:39:05 -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 44850 invoked by uid 99); 27 Jan 2015 06:39:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 06:39:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DD245E083E; Tue, 27 Jan 2015 06:39:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Tue, 27 Jan 2015 06:39:00 -0000 Message-Id: <11ce0c45bdb54f9fb11cb189a6e21154@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] camel git commit: CAMEL-8266 Allows ignoring directories for SFTP/FTP having no read permission using ignoreFileNotFoundOrPermissionError Repository: camel Updated Branches: refs/heads/camel-2.14.x 5f17c37ac -> 53d87f5db refs/heads/master e369640c5 -> 5cf0fc315 CAMEL-8266 Allows ignoring directories for SFTP/FTP having no read permission using ignoreFileNotFoundOrPermissionError Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5cf0fc31 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5cf0fc31 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5cf0fc31 Branch: refs/heads/master Commit: 5cf0fc315c96dfab1d3d6406b2376add3f688e99 Parents: e369640 Author: Claus Ibsen Authored: Tue Jan 27 07:38:25 2015 +0100 Committer: Claus Ibsen Committed: Tue Jan 27 07:38:25 2015 +0100 ---------------------------------------------------------------------- .../file/remote/RemoteFileIgnoreDoPollErrorTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/5cf0fc31/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileIgnoreDoPollErrorTest.java ---------------------------------------------------------------------- diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileIgnoreDoPollErrorTest.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileIgnoreDoPollErrorTest.java index 3ca70b6..f7e8dd89 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileIgnoreDoPollErrorTest.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileIgnoreDoPollErrorTest.java @@ -90,14 +90,13 @@ public class RemoteFileIgnoreDoPollErrorTest { return new RemoteFileConsumer(remoteFileEndpoint, null, null) { @Override protected boolean doPollDirectory(String absolutePath, String dirName, List> genericFiles, int depth) { - switch (doPollResult) { - case "IllegalStateException": + if ("IllegalStateException".equals(doPollResult)) { throw new IllegalStateException("Problem"); - case "GenericFileOperationFailedException": + } else if ("GenericFileOperationFailedException".equals(doPollResult)) { throw new GenericFileOperationFailedException("Perm error"); - case "true": + } else if ("true".equals(doPollResult)) { return true; - default: + } else { return false; } }