Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0186C200C20 for ; Sun, 19 Feb 2017 12:36:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0015E160B65; Sun, 19 Feb 2017 11:36:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 46157160B58 for ; Sun, 19 Feb 2017 12:36:05 +0100 (CET) Received: (qmail 13086 invoked by uid 500); 19 Feb 2017 11:36:04 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 13076 invoked by uid 99); 19 Feb 2017 11:36:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2017 11:36:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EF2DADFC69; Sun, 19 Feb 2017 11:36:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: camel git commit: Validte that the lock has been configured with mandatory options Date: Sun, 19 Feb 2017 11:36:03 +0000 (UTC) archived-at: Sun, 19 Feb 2017 11:36:06 -0000 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 Authored: Sun Feb 19 12:34:02 2017 +0100 Committer: Claus Ibsen 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);