You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/04/10 15:05:38 UTC
[2/6] incubator-ignite git commit: ignite-698 - fix for IGNITE-569
part1
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-sprint-3
Commit: caa54a2d9a35e90bee6fba1d71d6a8790712428d
Parents: 8389cd0
Author: S.Vladykin <sv...@gridgain.com>
Authored: Fri Apr 10 00:34:20 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
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<K, V> extends MutableConfiguration<K, V> {
}
/**
- * 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.
* <p>
@@ -1528,7 +1527,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
}
/**
- * 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.
* <p>
@@ -1541,6 +1540,9 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
* @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;
}