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 C360817A62 for ; Thu, 9 Apr 2015 21:56:30 +0000 (UTC) Received: (qmail 15914 invoked by uid 500); 9 Apr 2015 21:56:30 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 15881 invoked by uid 500); 9 Apr 2015 21:56:30 -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 15863 invoked by uid 99); 9 Apr 2015 21:56:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Apr 2015 21:56:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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, 09 Apr 2015 21:56:08 +0000 Received: (qmail 9215 invoked by uid 99); 9 Apr 2015 21:54:51 -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, 09 Apr 2015 21:54:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F25DCE022E; Thu, 9 Apr 2015 21:54:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergi@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 09 Apr 2015 21:54:56 -0000 Message-Id: <39e24be479d0415692675ffdf06af6b1@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [7/9] incubator-ignite git commit: ignite-698 - fix for IGNITE-569 part1 X-Virus-Checked: Checked by ClamAV on apache.org ignite-698 - fix for IGNITE-569 part1 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/caa54a2d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/caa54a2d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/caa54a2d Branch: refs/heads/ignite-698 Commit: caa54a2d9a35e90bee6fba1d71d6a8790712428d Parents: 8389cd0 Author: S.Vladykin Authored: Fri Apr 10 00:34:20 2015 +0300 Committer: S.Vladykin Committed: Fri Apr 10 00:34:20 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/configuration/CacheConfiguration.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/caa54a2d/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java index bd3fac7..1b78add 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java @@ -27,7 +27,6 @@ import org.apache.ignite.cache.store.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; -import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; import org.apache.ignite.plugin.*; @@ -1511,7 +1510,7 @@ public class CacheConfiguration extends MutableConfiguration { } /** - * Array of key and value type pairs to be indexed. + * Array of key and value type pairs to be indexed (thus array length must be always even). * It means each even (0,2,4...) class in the array will be considered as key type for cache entry, * each odd (1,3,5...) class will be considered as value type for cache entry. *

@@ -1528,7 +1527,7 @@ public class CacheConfiguration extends MutableConfiguration { } /** - * Array of key and value type pairs to be indexed. + * Array of key and value type pairs to be indexed (thus array length must be always even). * It means each even (0,2,4...) class in the array will be considered as key type for cache entry, * each odd (1,3,5...) class will be considered as value type for cache entry. *

@@ -1541,6 +1540,9 @@ public class CacheConfiguration extends MutableConfiguration { * @param indexedTypes Key and value type pairs. */ public void setIndexedTypes(Class... indexedTypes) { + A.ensure(indexedTypes == null || (indexedTypes.length & 1) == 0, + "Number of indexed types is expected to be even. Refer to method javadoc for details."); + this.indexedTypes = indexedTypes; }