You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/04/17 09:59:39 UTC
[camel] 02/13: (chores) camel-ftp: combined duplicated catch blocks
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 9f4373494249e31944372c76cb20b2e9fa1c64ff
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Apr 17 10:17:16 2023 +0200
(chores) camel-ftp: combined duplicated catch blocks
---
.../java/org/apache/camel/component/file/remote/SftpOperations.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
index 974d6a3c592..f2db70eb23f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
@@ -1060,9 +1060,7 @@ public class SftpOperations implements RemoteFileOperations<SftpRemoteFile> {
} catch (SftpException e) {
createResultHeadersFromExchange(e, exchange);
throw new GenericFileOperationFailedException("Cannot store file: " + name, e);
- } catch (InvalidPayloadException e) {
- throw new GenericFileOperationFailedException("Cannot store file: " + name, e);
- } catch (UnsupportedEncodingException e) {
+ } catch (UnsupportedEncodingException | InvalidPayloadException e) {
throw new GenericFileOperationFailedException("Cannot store file: " + name, e);
} finally {
IOHelper.close(is, "store: " + name, LOG);