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 2022/04/08 14:47:10 UTC

[camel] 05/09: CAMEL-17763: cleanup unused exceptions in camel-git

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 7c3ea0ab6108f38dc41af58b2f69cf6d34be3c8e
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Apr 8 15:42:18 2022 +0200

    CAMEL-17763: cleanup unused exceptions in camel-git
---
 .../component/git/consumer/GitConsumerTest.java    |  4 ++--
 .../component/git/producer/GitProducerTest.java    | 22 +++++++++++-----------
 .../git/producer/GitRemoteProducerTest.java        |  8 ++++----
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/components/camel-git/src/test/java/org/apache/camel/component/git/consumer/GitConsumerTest.java b/components/camel-git/src/test/java/org/apache/camel/component/git/consumer/GitConsumerTest.java
index cafa067999b..c99a570ee83 100644
--- a/components/camel-git/src/test/java/org/apache/camel/component/git/consumer/GitConsumerTest.java
+++ b/components/camel-git/src/test/java/org/apache/camel/component/git/consumer/GitConsumerTest.java
@@ -161,10 +161,10 @@ public class GitConsumerTest extends GitTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:clone").to("git://" + gitLocalRepo
                                         + "?remotePath=https://github.com/oscerd/json-webserver-example.git&operation=clone");
                 from("direct:init").to("git://" + gitLocalRepo + "?operation=init");
diff --git a/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitProducerTest.java b/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitProducerTest.java
index 56cf690a498..5f9bc6c1356 100644
--- a/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitProducerTest.java
+++ b/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitProducerTest.java
@@ -52,14 +52,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class GitProducerTest extends GitTestSupport {
 
     @Test
-    public void cloneTest() throws Exception {
+    public void cloneTest() {
         template.sendBody("direct:clone", "");
         File gitDir = new File(gitLocalRepo, ".git");
         assertEquals(true, gitDir.exists());
     }
 
     @Test
-    public void initTest() throws Exception {
+    public void initTest() {
         template.sendBody("direct:init", "");
         File gitDir = new File(gitLocalRepo, ".git");
         assertEquals(true, gitDir.exists());
@@ -145,7 +145,7 @@ public class GitProducerTest extends GitTestSupport {
     }
 
     @Test
-    public void pullTest() throws Exception {
+    public void pullTest() {
         template.sendBody("direct:clone", "");
         File gitDir = new File(gitLocalRepo, ".git");
         assertEquals(true, gitDir.exists());
@@ -291,7 +291,7 @@ public class GitProducerTest extends GitTestSupport {
         // Test camel-git commit (with branch)
         template.send("direct:commit-branch", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_COMMIT_MESSAGE, commitMessageBranch);
             }
         });
@@ -308,7 +308,7 @@ public class GitProducerTest extends GitTestSupport {
 
         template.send("direct:commit-all", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_COMMIT_MESSAGE, commitMessageAll);
             }
         });
@@ -336,14 +336,14 @@ public class GitProducerTest extends GitTestSupport {
         // Test camel-git add and commit (different branches)
         template.send("direct:add-on-branch", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_FILE_NAME, filenameBranchToAdd);
             }
         });
 
         template.send("direct:commit-all-branch", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_COMMIT_MESSAGE, commitMessageAll);
             }
         });
@@ -376,7 +376,7 @@ public class GitProducerTest extends GitTestSupport {
         // Test camel-git remove
         template.send("direct:remove-on-branch", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_FILE_NAME, filenameToAdd);
             }
         });
@@ -845,7 +845,7 @@ public class GitProducerTest extends GitTestSupport {
         // Test camel-git commit (with branch)
         template.send("direct:commit-branch", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_COMMIT_MESSAGE, commitMessageBranch);
             }
         });
@@ -886,10 +886,10 @@ public class GitProducerTest extends GitTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:clone").to("git://" + gitLocalRepo
                                         + "?remotePath=https://github.com/oscerd/json-webserver-example.git&operation=clone");
                 from("direct:init").to("git://" + gitLocalRepo + "?operation=init");
diff --git a/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitRemoteProducerTest.java b/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitRemoteProducerTest.java
index ad80cac9b2e..f170d2545ef 100644
--- a/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitRemoteProducerTest.java
+++ b/components/camel-git/src/test/java/org/apache/camel/component/git/producer/GitRemoteProducerTest.java
@@ -45,7 +45,7 @@ public class GitRemoteProducerTest extends GitTestSupport {
 
         template.send("direct:add", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_FILE_NAME, filenameToAdd);
             }
         });
@@ -57,7 +57,7 @@ public class GitRemoteProducerTest extends GitTestSupport {
 
         template.send("direct:commit", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(GitConstants.GIT_COMMIT_MESSAGE, commitMessage);
             }
         });
@@ -68,10 +68,10 @@ public class GitRemoteProducerTest extends GitTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:add").to("git://" + gitLocalRepo + "?operation=add");
                 from("direct:commit").to("git://" + gitLocalRepo + "?operation=commit");
                 from("direct:push")