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 acfff12ce011ce43cb95f6a92bbd187786a624b5
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Tue Apr 12 18:22:57 2022 +0200

    CAMEL-17763: cleaned up unused exceptions in camel-rest-openapi
---
 .../org/apache/camel/component/rest/openapi/HttpsTest.java  |  4 ++--
 .../apache/camel/component/rest/openapi/HttpsV3Test.java    |  4 ++--
 .../component/rest/openapi/RestOpenApiComponentTest.java    |  4 ++--
 .../component/rest/openapi/RestOpenApiComponentV3Test.java  |  4 ++--
 .../component/rest/openapi/RestOpenApiEndpointTest.java     | 13 ++++++-------
 .../component/rest/openapi/RestOpenApiEndpointV3Test.java   | 13 ++++++-------
 6 files changed, 20 insertions(+), 22 deletions(-)

diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
index a82242df848..b871899acaa 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
@@ -83,7 +83,7 @@ public abstract class HttpsTest extends CamelTestSupport {
     }
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
     }
 
     @BeforeEach
@@ -126,7 +126,7 @@ public abstract class HttpsTest extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
index 9170e6d1772..f6b0467faf5 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
@@ -83,7 +83,7 @@ public abstract class HttpsV3Test extends CamelTestSupport {
     }
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
     }
 
     @BeforeEach
@@ -126,7 +126,7 @@ public abstract class HttpsV3Test extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
index 15986ffe479..2256b34aca5 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
@@ -73,7 +73,7 @@ public class RestOpenApiComponentTest extends 
CamelTestSupport {
     }
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
     }
 
     @BeforeEach
@@ -214,7 +214,7 @@ public class RestOpenApiComponentTest extends 
CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentV3Test.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentV3Test.java
index 7ac15339785..b624c43eab2 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentV3Test.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentV3Test.java
@@ -73,7 +73,7 @@ public class RestOpenApiComponentV3Test extends 
CamelTestSupport {
     }
 
     @Override
-    public void setUp() throws Exception {
+    public void setUp() {
     }
 
     @BeforeEach
@@ -215,7 +215,7 @@ public class RestOpenApiComponentV3Test extends 
CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointTest.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointTest.java
index f36f749349a..bce1c2dea58 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointTest.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.rest.openapi;
 
-import java.io.IOException;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -49,7 +48,7 @@ public class RestOpenApiEndpointTest {
     URI endpointUri = URI.create("endpoint.json");
 
     @Test
-    public void shouldComplainForUnknownOperations() throws Exception {
+    public void shouldComplainForUnknownOperations() {
         final CamelContext camelContext = mock(CamelContext.class);
         when(camelContext.getClassResolver()).thenReturn(new 
DefaultClassResolver());
 
@@ -261,7 +260,7 @@ public class RestOpenApiEndpointTest {
     }
 
     @Test
-    public void shouldHonourComponentSpecificationPathProperty() throws 
Exception {
+    public void shouldHonourComponentSpecificationPathProperty() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
         component.setSpecificationUri(componentJsonUri);
 
@@ -273,7 +272,7 @@ public class RestOpenApiEndpointTest {
     }
 
     @Test
-    public void shouldHonourEndpointUriPathSpecificationPathProperty() throws 
Exception {
+    public void shouldHonourEndpointUriPathSpecificationPathProperty() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
         component.setSpecificationUri(componentJsonUri);
 
@@ -373,7 +372,7 @@ public class RestOpenApiEndpointTest {
     }
 
     @Test
-    public void shouldRaiseExceptionsForMissingSpecifications() throws 
IOException {
+    public void shouldRaiseExceptionsForMissingSpecifications() {
         final CamelContext camelContext = mock(CamelContext.class);
         when(camelContext.getClassResolver()).thenReturn(new 
DefaultClassResolver());
 
@@ -416,7 +415,7 @@ public class RestOpenApiEndpointTest {
     }
 
     @Test
-    public void shouldUseDefaultSpecificationUri() throws Exception {
+    public void shouldUseDefaultSpecificationUri() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
 
         final RestOpenApiEndpoint endpoint = new RestOpenApiEndpoint(
@@ -427,7 +426,7 @@ public class RestOpenApiEndpointTest {
     }
 
     @Test
-    public void shouldUseDefaultSpecificationUriEvenIfHashIsPresent() throws 
Exception {
+    public void shouldUseDefaultSpecificationUriEvenIfHashIsPresent() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
 
         final RestOpenApiEndpoint endpoint = new RestOpenApiEndpoint(
diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointV3Test.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointV3Test.java
index f7a3df10650..2600733e235 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointV3Test.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpointV3Test.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.rest.openapi;
 
-import java.io.IOException;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -51,7 +50,7 @@ public class RestOpenApiEndpointV3Test {
     URI endpointUri = URI.create("endpoint.json");
 
     @Test
-    public void shouldComplainForUnknownOperations() throws Exception {
+    public void shouldComplainForUnknownOperations() {
         final CamelContext camelContext = mock(CamelContext.class);
         when(camelContext.getClassResolver()).thenReturn(new 
DefaultClassResolver());
 
@@ -273,7 +272,7 @@ public class RestOpenApiEndpointV3Test {
     }
 
     @Test
-    public void shouldHonourComponentSpecificationPathProperty() throws 
Exception {
+    public void shouldHonourComponentSpecificationPathProperty() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
         component.setSpecificationUri(componentJsonUri);
 
@@ -285,7 +284,7 @@ public class RestOpenApiEndpointV3Test {
     }
 
     @Test
-    public void shouldHonourEndpointUriPathSpecificationPathProperty() throws 
Exception {
+    public void shouldHonourEndpointUriPathSpecificationPathProperty() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
         component.setSpecificationUri(componentJsonUri);
 
@@ -383,7 +382,7 @@ public class RestOpenApiEndpointV3Test {
     }
 
     @Test
-    public void shouldRaiseExceptionsForMissingSpecifications() throws 
IOException {
+    public void shouldRaiseExceptionsForMissingSpecifications() {
         final CamelContext camelContext = mock(CamelContext.class);
         when(camelContext.getClassResolver()).thenReturn(new 
DefaultClassResolver());
 
@@ -426,7 +425,7 @@ public class RestOpenApiEndpointV3Test {
     }
 
     @Test
-    public void shouldUseDefaultSpecificationUri() throws Exception {
+    public void shouldUseDefaultSpecificationUri() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
 
         final RestOpenApiEndpoint endpoint = new RestOpenApiEndpoint(
@@ -437,7 +436,7 @@ public class RestOpenApiEndpointV3Test {
     }
 
     @Test
-    public void shouldUseDefaultSpecificationUriEvenIfHashIsPresent() throws 
Exception {
+    public void shouldUseDefaultSpecificationUriEvenIfHashIsPresent() {
         final RestOpenApiComponent component = new RestOpenApiComponent();
 
         final RestOpenApiEndpoint endpoint = new RestOpenApiEndpoint(

Reply via email to