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 15:09:00 UTC
[camel] 02/10: CAMEL-17763: cleanup unused exceptions in camel-zookeeper
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 4e58e4ace55333c8b12f9a6d230331be831ce45f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Apr 8 15:56:30 2022 +0200
CAMEL-17763: cleanup unused exceptions in camel-zookeeper
---
.../camel/component/zookeeper/NaturalSortComparatorTest.java | 2 +-
.../component/zookeeper/ZooKeeperCuratorHelperTest.java | 2 +-
.../cloud/integration/ZooKeeperServiceCallRouteIT.java | 4 ++--
...eeperServiceRegistrationWithRoutePolicyAndMetadataIT.java | 4 ++--
...ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT.java | 4 ++--
.../ZooKeeperServiceRegistrationWithRoutePolicyIT.java | 4 ++--
.../ZooKeeperServiceRegistrationWithServiceComponentIT.java | 4 ++--
.../cluster/ZooKeeperClusteredRoutePolicyFactoryMain.java | 2 +-
.../component/zookeeper/cluster/ZooKeeperMasterMain.java | 2 +-
.../integration/ZooKeeperClusteredRoutePolicyFactoryIT.java | 2 +-
.../zookeeper/cluster/integration/ZooKeeperMasterIT.java | 2 +-
.../component/zookeeper/integration/ConsumeChildrenIT.java | 4 ++--
.../camel/component/zookeeper/integration/ConsumeDataIT.java | 4 ++--
.../component/zookeeper/integration/ZooKeeperProducerIT.java | 12 ++++++------
14 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/NaturalSortComparatorTest.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/NaturalSortComparatorTest.java
index 418a06b2df8..aac0fe885ff 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/NaturalSortComparatorTest.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/NaturalSortComparatorTest.java
@@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class NaturalSortComparatorTest {
@Test
- public void testSortOrder() throws Exception {
+ public void testSortOrder() {
List<String> sorted = Arrays
.asList(new String[] {
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperCuratorHelperTest.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperCuratorHelperTest.java
index c38ca92494e..02b26124487 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperCuratorHelperTest.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/ZooKeeperCuratorHelperTest.java
@@ -26,7 +26,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
public class ZooKeeperCuratorHelperTest {
@Test
- public void testCreateCuratorRetryPolicy() throws Exception {
+ public void testCreateCuratorRetryPolicy() {
ZooKeeperCuratorConfiguration configuration = new ZooKeeperCuratorConfiguration();
configuration.setNodes("nodes1,node2,node3");
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceCallRouteIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceCallRouteIT.java
index ea5a5f48772..6dd9549bc70 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceCallRouteIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceCallRouteIT.java
@@ -125,10 +125,10 @@ public class ZooKeeperServiceCallRouteIT extends CamelTestSupport {
// *************************************************************************
@Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("direct:start")
.serviceCall()
.name(SERVICE_NAME)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyAndMetadataIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyAndMetadataIT.java
index a6a953a52cf..b3901c09a75 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyAndMetadataIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyAndMetadataIT.java
@@ -23,10 +23,10 @@ import org.apache.camel.impl.cloud.ServiceRegistrationRoutePolicy;
public class ZooKeeperServiceRegistrationWithRoutePolicyAndMetadataIT extends ZooKeeperServiceRegistrationITBase {
@Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
fromF("jetty:http://0.0.0.0:%d/service/endpoint", SERVICE_PORT)
.routeId(SERVICE_ID)
.routeProperty(ServiceDefinition.SERVICE_META_ID, SERVICE_ID)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT.java
index 205a52248d5..c0446f24ffe 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT.java
@@ -31,10 +31,10 @@ public class ZooKeeperServiceRegistrationWithRoutePolicyFactoryIT extends ZooKee
}
@Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
fromF("jetty:http://0.0.0.0:%d/service/endpoint", SERVICE_PORT)
.routeId(SERVICE_ID)
.routeGroup(SERVICE_NAME)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyIT.java
index 20d7e53d992..a9e2e968e04 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithRoutePolicyIT.java
@@ -22,10 +22,10 @@ import org.apache.camel.impl.cloud.ServiceRegistrationRoutePolicy;
public class ZooKeeperServiceRegistrationWithRoutePolicyIT extends ZooKeeperServiceRegistrationITBase {
@Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
fromF("jetty:http://0.0.0.0:%d/service/endpoint", SERVICE_PORT)
.routeId(SERVICE_ID)
.routeGroup(SERVICE_NAME)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithServiceComponentIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithServiceComponentIT.java
index 6addd577bc0..0cc75b54ccc 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithServiceComponentIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cloud/integration/ZooKeeperServiceRegistrationWithServiceComponentIT.java
@@ -35,10 +35,10 @@ public class ZooKeeperServiceRegistrationWithServiceComponentIT extends ZooKeepe
}
@Override
- protected RoutesBuilder createRouteBuilder() throws Exception {
+ protected RoutesBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
fromF("service:%s:jetty:http://0.0.0.0:%d/service/endpoint?service.type=zookeeper", SERVICE_NAME, SERVICE_PORT)
.routeId(SERVICE_ID)
.routeGroup(SERVICE_NAME)
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperClusteredRoutePolicyFactoryMain.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperClusteredRoutePolicyFactoryMain.java
index b077a3976c2..25263d483c7 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperClusteredRoutePolicyFactoryMain.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperClusteredRoutePolicyFactoryMain.java
@@ -55,7 +55,7 @@ public final class ZooKeeperClusteredRoutePolicyFactoryMain {
main.configure().addRoutesBuilder(new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("timer:clustered?delay=1000&period=1000")
.routeId("route-" + id)
.log("Route ${routeId} is running ...");
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperMasterMain.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperMasterMain.java
index f1d8a3f834d..b4b0eada636 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperMasterMain.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/ZooKeeperMasterMain.java
@@ -55,7 +55,7 @@ public final class ZooKeeperMasterMain {
main.configure().addRoutesBuilder(new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
final int delay = 1 + ThreadLocalRandom.current().nextInt(10);
final int period = 1 + ThreadLocalRandom.current().nextInt(5);
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperClusteredRoutePolicyFactoryIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperClusteredRoutePolicyFactoryIT.java
index 2d41080dd4b..06633ee0657 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperClusteredRoutePolicyFactoryIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperClusteredRoutePolicyFactoryIT.java
@@ -89,7 +89,7 @@ public final class ZooKeeperClusteredRoutePolicyFactoryIT {
context.addRoutePolicyFactory(ClusteredRoutePolicyFactory.forNamespace("my-ns"));
context.addRoutes(new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("timer:zookeeper?delay=1000&period=1000")
.routeId("route-" + id)
.log("From ${routeId}")
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperMasterIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperMasterIT.java
index b7974d88a0f..3bc75576e45 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperMasterIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/cluster/integration/ZooKeeperMasterIT.java
@@ -87,7 +87,7 @@ public final class ZooKeeperMasterIT {
context.addService(service);
context.addRoutes(new RouteBuilder() {
@Override
- public void configure() throws Exception {
+ public void configure() {
from("master:zk:timer:master?delay=1000&period=1000")
.routeId("route-" + id)
.log("From ${routeId}")
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeChildrenIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeChildrenIT.java
index 4c0cf685738..26d171b3a64 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeChildrenIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeChildrenIT.java
@@ -38,9 +38,9 @@ import static org.junit.jupiter.api.Assertions.assertNotSame;
public class ConsumeChildrenIT extends ZooKeeperITSupport {
@Override
- protected RouteBuilder[] createRouteBuilders() throws Exception {
+ protected RouteBuilder[] createRouteBuilders() {
return new RouteBuilder[] { new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("zookeeper://{{zookeeper.connection.string}}/grimm?repeat=true&listChildren=true")
.sort(body(), new NaturalSortComparator(Order.Descending))
.to("mock:zookeeper-data");
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeDataIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeDataIT.java
index e5f7591980b..f93c9156bd4 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeDataIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ConsumeDataIT.java
@@ -31,9 +31,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class ConsumeDataIT extends ZooKeeperITSupport {
@Override
- protected RouteBuilder[] createRouteBuilders() throws Exception {
+ protected RouteBuilder[] createRouteBuilders() {
return new RouteBuilder[] { new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("zookeeper://{{zookeeper.connection.string}}/camel?repeat=true")
.to("mock:zookeeper-data");
}
diff --git a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ZooKeeperProducerIT.java b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ZooKeeperProducerIT.java
index 7cfdefa3ada..5e8d98eb646 100644
--- a/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ZooKeeperProducerIT.java
+++ b/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/integration/ZooKeeperProducerIT.java
@@ -42,10 +42,10 @@ public class ZooKeeperProducerIT extends ZooKeeperITSupport {
private String testPayload = "TestPayload";
@Override
- protected RouteBuilder[] createRouteBuilders() throws Exception {
+ protected RouteBuilder[] createRouteBuilders() {
return new RouteBuilder[] {
new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
zookeeperUri
= "zookeeper://{{zookeeper.connection.string}}/node?create=true";
from("direct:roundtrip")
@@ -56,13 +56,13 @@ public class ZooKeeperProducerIT extends ZooKeeperITSupport {
}
},
new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("direct:no-create-fails-set")
.to("zookeeper://{{zookeeper.connection.string}}/doesnotexist");
}
},
new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("direct:node-from-header")
.to("zookeeper://{{zookeeper.connection.string}}/notset?create=true");
from("zookeeper://{{zookeeper.connection.string}}/set?create=true")
@@ -70,14 +70,14 @@ public class ZooKeeperProducerIT extends ZooKeeperITSupport {
}
},
new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("direct:create-mode")
.to("zookeeper://{{zookeeper.connection.string}}/persistent?create=true&createMode=PERSISTENT")
.to("mock:create-mode");
}
},
new RouteBuilder() {
- public void configure() throws Exception {
+ public void configure() {
from("direct:delete")
.to("zookeeper://{{zookeeper.connection.string}}/to-be-deleted")
.to("mock:delete");