camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Validte that the lock has been configured with mandatory options
Date Sun, 19 Feb 2017 11:36:03 GMT
Repository: camel
Updated Branches:
  refs/heads/master b7667a422 -> 34e2c13b7


Validte that the lock has been configured with mandatory options


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/34e2c13b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/34e2c13b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/34e2c13b

Branch: refs/heads/master
Commit: 34e2c13b7f495e80d42ea3ccedc4c44dae9406d9
Parents: b7667a4
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Feb 19 12:34:02 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Feb 19 12:34:02 2017 +0100

----------------------------------------------------------------------
 .../component/hazelcast/policy/HazelcastRoutePolicy.java      | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/34e2c13b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
index 8d9e142..45bb421 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicy.java
@@ -30,6 +30,8 @@ import org.apache.camel.NonManagedService;
 import org.apache.camel.Route;
 import org.apache.camel.component.hazelcast.HazelcastUtil;
 import org.apache.camel.support.RoutePolicySupport;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.StringHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -99,6 +101,11 @@ public class HazelcastRoutePolicy extends RoutePolicySupport implements
NonManag
 
     @Override
     protected void doStart() throws Exception {
+        // validate
+        StringHelper.notEmpty(lockMapName, "lockMapName", this);
+        StringHelper.notEmpty(lockKey, "lockKey", this);
+        StringHelper.notEmpty(lockValue, "lockValue", this);
+
         locks = instance.getMap(lockMapName);
         future = executorService.submit(this::acquireLeadership);
 


Mime
View raw message