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 b8ea7d69c20397a66b228e3cc35a9fe479321a14 Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Mon Apr 17 10:15:14 2023 +0200 (chores) camel-file: combined duplicated catch blocks --- .../src/main/java/org/apache/camel/component/file/FileOperations.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java b/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java index cfc7ce6e16a..353246ea9ab 100644 --- a/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java +++ b/components/camel-file/src/main/java/org/apache/camel/component/file/FileOperations.java @@ -405,9 +405,7 @@ public class FileOperations implements GenericFileOperations<File> { } return true; - } catch (IOException e) { - throw new GenericFileOperationFailedException("Cannot store file: " + file, e); - } catch (InvalidPayloadException e) { + } catch (InvalidPayloadException | IOException e) { throw new GenericFileOperationFailedException("Cannot store file: " + file, e); } }
