Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF4501889F for ; Thu, 18 Jun 2015 14:48:49 +0000 (UTC) Received: (qmail 19421 invoked by uid 500); 18 Jun 2015 14:48:49 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 19389 invoked by uid 500); 18 Jun 2015 14:48:49 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 19380 invoked by uid 99); 18 Jun 2015 14:48:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2015 14:48:49 +0000 X-ASF-Spam-Status: No, hits=-2000.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 18 Jun 2015 14:46:36 +0000 Received: (qmail 18496 invoked by uid 99); 18 Jun 2015 14:48:23 -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; Thu, 18 Jun 2015 14:48:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 140F6E3C8E; Thu, 18 Jun 2015 14:48:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 18 Jun 2015 14:48:37 -0000 Message-Id: <5622eb38e20c4d58a5f4cb474e0a5695@git.apache.org> In-Reply-To: <5d2e2c0d04da49208efa4f997496ee21@git.apache.org> References: <5d2e2c0d04da49208efa4f997496ee21@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/16] incubator-ignite git commit: # ignite-1033: Fix. X-Virus-Checked: Checked by ClamAV on apache.org # ignite-1033: Fix. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/60650b0f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/60650b0f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/60650b0f Branch: refs/heads/ignite-917-review Commit: 60650b0ffbc063343a630631570d8dc2801b657b Parents: c878b3c Author: ashutak Authored: Thu Jun 18 17:48:20 2015 +0300 Committer: ashutak Committed: Thu Jun 18 17:48:20 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/cluster/ClusterNode.java | 2 ++ .../ignite/internal/util/IgniteUtils.java | 6 +++--- .../internal/util/IgniteUtilsSelfTest.java | 22 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/60650b0f/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java index 85fd08a..bb792d5 100644 --- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java +++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java @@ -188,6 +188,8 @@ public interface ClusterNode { *

* If {@link IgniteConfiguration#getLocalHost()} value is {@code null} then local wildcard address will be used, * and this method returns host names of all addresses of that node. + *

, Collection> addrs = U.resolveLocalAddresses(inetAddress); + + Collection hostNames = addrs.get2(); + + assertFalse(hostNames.contains(null)); + assertFalse(hostNames.contains("")); + assertFalse(hostNames.contains("127.0.0.1")); + + assertFalse(F.exist(hostNames, new IgnitePredicate() { + @Override public boolean apply(String hostName) { + return hostName.contains("localhost") || hostName.contains("0:0:0:0:0:0:0:1"); + } + })); + } + + /** * Test enum. */ private enum TestEnum {