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 3481438341eeec3f81f1145170143b23c99c1570
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Tue Apr 12 18:17:14 2022 +0200

    CAMEL-17763: cleaned up unused exceptions in camel-pubnub
---
 .../apache/camel/component/pubnub/PubNubConfigurationTest.java |  2 +-
 .../java/org/apache/camel/component/pubnub/PubNubFireTest.java |  2 +-
 .../apache/camel/component/pubnub/PubNubOperationsTest.java    | 10 +++++-----
 .../org/apache/camel/component/pubnub/PubNubPresenceTest.java  |  2 +-
 .../org/apache/camel/component/pubnub/PubNubPublishTest.java   |  4 ++--
 .../apache/camel/component/pubnub/PubNubSubscriberTest.java    |  2 +-
 .../java/org/apache/camel/component/pubnub/PubNubTestBase.java |  4 ++--
 .../component/pubnub/example/PubNubGeoLocationExample.java     |  2 +-
 .../camel/component/pubnub/example/PubNubPresenseExample.java  |  2 +-
 .../camel/component/pubnub/example/PubNubSensor2Example.java   |  4 ++--
 .../camel/component/pubnub/example/PubNubSensorExample.java    |  2 +-
 .../camel/component/pubnub/example/PubNubStateExample.java     |  2 +-
 12 files changed, 19 insertions(+), 19 deletions(-)

diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
index 27dc5a68144..1588fab9441 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class PubNubConfigurationTest extends CamelTestSupport {
 
     @Test
-    public void createEndpointWithIllegalArguments() throws Exception {
+    public void createEndpointWithIllegalArguments() {
         PubNubComponent component = context.getComponent("pubnub", 
PubNubComponent.class);
         assertThrows(IllegalArgumentException.class,
                 () -> component.createEndpoint("pubnub"));
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
index 09854043aa5..a00f4d14924 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
@@ -45,7 +45,7 @@ public class PubNubFireTest extends PubNubTestBase {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 from("direct:publish").to(endpoint).to("mock:result");
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubOperationsTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubOperationsTest.java
index 657ced97d09..ab2ea048fcf 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubOperationsTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubOperationsTest.java
@@ -39,7 +39,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 public class PubNubOperationsTest extends PubNubTestBase {
 
     @Test
-    public void testWhereNow() throws Exception {
+    public void testWhereNow() {
         
stubFor(get(urlPathEqualTo("/v2/presence/sub-key/mySubscribeKey/uuid/myUUID"))
                 .willReturn(aResponse().withBody(
                         "{\"status\": 200, \"message\": \"OK\", \"payload\": 
{\"channels\": [\"channel-a\",\"channel-b\"]}, \"service\": \"Presence\"}")));
@@ -55,7 +55,7 @@ public class PubNubOperationsTest extends PubNubTestBase {
     }
 
     @Test
-    public void testHereNow() throws Exception {
+    public void testHereNow() {
         
stubFor(get(urlPathEqualTo("/v2/presence/sub_key/mySubscribeKey/channel/myChannel")).willReturn(aResponse()
                 .withBody(
                         "{\"status\" : 200, \"message\" : \"OK\", \"service\" 
: \"Presence\", \"uuids\" : [{\"uuid\" : \"myUUID0\"}, {\"state\" : {\"abcd\" : 
{\"age\" : 15}}, "
@@ -106,7 +106,7 @@ public class PubNubOperationsTest extends PubNubTestBase {
     }
 
     @Test
-    public void testGetState() throws Exception {
+    public void testGetState() {
         
stubFor(get(urlPathEqualTo("/v2/presence/sub-key/mySubscribeKey/channel/myChannel/uuid/myuuid")).willReturn(aResponse()
                 .withBody("{ \"status\": 200, \"message\": \"OK\", 
\"payload\": "
                           + "{ \"myChannel\": { \"age\" : 20, \"status\" : 
\"online\"}, \"ch2\": { \"age\": 100, \"status\": \"offline\" } }, \"service\": 
\"Presence\"}")));
@@ -118,7 +118,7 @@ public class PubNubOperationsTest extends PubNubTestBase {
     }
 
     @Test
-    public void testSetState() throws Exception {
+    public void testSetState() {
         
stubFor(get(urlPathEqualTo("/v2/presence/sub-key/mySubscribeKey/channel/myChannel/uuid/myuuid/data"))
                 .willReturn(aResponse().withBody(
                         "{ \"status\": 200, \"message\": \"OK\", \"payload\": 
{ \"age\" : 20, \"status\" : \"online\" }, \"service\": \"Presence\"}")));
@@ -133,7 +133,7 @@ public class PubNubOperationsTest extends PubNubTestBase {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 
from("direct:publish").to("pubnub://myChannel?uuid=myuuid&pubnub=#pubnub")
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresenceTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresenceTest.java
index 11446453af5..aa148d4a071 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresenceTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresenceTest.java
@@ -74,7 +74,7 @@ public class PubNubPresenceTest extends PubNubTestBase {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 
from("pubnub:mychannel?pubnub=#pubnub&withPresence=true").id("presence-route")
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
index d2c2a4637e4..cbee4213404 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
@@ -47,7 +47,7 @@ public class PubNubPublishTest extends PubNubTestBase {
     }
 
     @Test
-    public void testPublishEmptyBody() throws Exception {
+    public void testPublishEmptyBody() {
         assertThrows(CamelExecutionException.class,
                 () -> template.sendBody("direct:publish", null));
     }
@@ -64,7 +64,7 @@ public class PubNubPublishTest extends PubNubTestBase {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 from("direct:publish").to(endpoint).to("mock:result");
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
index 21740a3d453..94d295adff1 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
@@ -48,7 +48,7 @@ public class PubNubSubscriberTest extends PubNubTestBase {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 
from("pubnub:mychannel?pubnub=#pubnub").id("subroute").autoStartup(false)
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubTestBase.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubTestBase.java
index 6aae396da50..469621f89d0 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubTestBase.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubTestBase.java
@@ -37,12 +37,12 @@ public class PubNubTestBase extends CamelTestSupport {
 
     private WireMockServer wireMockServer = new 
WireMockServer(options().port(port));
 
-    protected void setupResources() throws Exception {
+    protected void setupResources() {
         wireMockServer.start();
         WireMock.configureFor("localhost", wireMockServer.port());
     }
 
-    protected void cleanupResources() throws Exception {
+    protected void cleanupResources() {
         wireMockServer.stop();
         pubnub.destroy();
     }
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
index 10b46de2f57..ed4c767210a 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
@@ -39,7 +39,7 @@ public final class PubNubGeoLocationExample {
 
     static class GeoLocationRoute extends RouteBuilder {
         @Override
-        public void configure() throws Exception {
+        public void configure() {
             from("timer:geotimer")
                     .process(exchange -> exchange.getIn().setBody(new 
Foo("bar", "TEXT")))
                     
.to("pubnub:eon-maps-geolocation-input?operation=fire&publishKey=" + 
PUBNUB_PUBLISH_KEY + "&subscribeKey="
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
index c03762f9da4..cda1d0ccfc2 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
@@ -34,7 +34,7 @@ public final class PubNubPresenseExample {
 
     static class PresensRoute extends RouteBuilder {
         @Override
-        public void configure() throws Exception {
+        public void configure() {
             from("pubnub:iot?withPresence=true&subscribeKey=" + 
PUBNUB_SUBSCRIBE_KEY)
                     .log("${body}")
                     .to("mock:result");
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
index 22123ee5ad6..4825efb0100 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
@@ -52,7 +52,7 @@ public final class PubNubSensor2Example {
                                                + "&subscribeKey=" + 
PUBNUB_SUBSCRIBE_KEY;
 
         @Override
-        public void configure() throws Exception {
+        public void configure() {
             from("timer:device2").routeId("device-event-route")
                     .bean(PubNubSensor2Example.EventGeneratorBean.class, 
"getRandomEvent('device2')")
                     .to(deviceEP);
@@ -69,7 +69,7 @@ public final class PubNubSensor2Example {
         private static Map<String, String> devices = new ConcurrentHashMap<>();
 
         @Override
-        public void configure() throws Exception {
+        public void configure() {
             from(masterEP)
                     .routeId("master-route")
                     
.bean(PubNubSensor2Example.PubsubRoute.DataProcessorBean.class, 
"doSomethingInteresting(${body})")
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
index aebf4866e7a..d65210966e7 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
@@ -32,7 +32,7 @@ public final class PubNubSensorExample {
 
     static class SensorRoute extends RouteBuilder {
         @Override
-        public void configure() throws Exception {
+        public void configure() {
             
from("pubnub:pubnub-sensor-network?subscribeKey=sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe").log("${body}")
                     .to("mock:result");
         }
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubStateExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubStateExample.java
index 1f848c9ac98..267be1bedb1 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubStateExample.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubStateExample.java
@@ -59,7 +59,7 @@ public class PubNubStateExample extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
                 from("direct:publish")

Reply via email to