# sprint-1 Check for null keys in loadAll to pass TCK
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b434ae8f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b434ae8f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b434ae8f Branch: refs/heads/ignite-sql-tests Commit: b434ae8f8f5876e3f9a9fa07b8af56fcf3f5a98e Parents: 67f2fd8 Author: sboikov <sboi...@gridgain.com> Authored: Thu Feb 12 10:31:52 2015 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Thu Feb 12 10:31:52 2015 +0300 ---------------------------------------------------------------------- .../internal/processors/cache/GridCacheAdapter.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b434ae8f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 2197238..e434c22 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -3905,7 +3905,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteInternalFuture<?> loadCacheAsync(final IgniteBiPredicate<K, V> p, final long ttl, final Object[] args) { + @Override public IgniteInternalFuture<?> loadCacheAsync(final IgniteBiPredicate<K, V> p, + final long ttl, + final Object[] args) + { return ctx.closures().callLocalSafe( ctx.projectSafe(new Callable<Object>() { @Nullable @Override public Object call() throws IgniteCheckedException { @@ -3927,6 +3930,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, ) { A.notNull(keys, "keys"); + for (Object key : keys) + A.notNull(key, "key"); + if (!ctx.store().configured()) return new GridFinishedFuture<>(ctx.kernalContext()); @@ -3936,7 +3942,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, if (replaceExisting) { if (ctx.store().isLocalStore()) { - Collection<ClusterNode> nodes = ctx.grid().forCacheNodes(name()).nodes(); + Collection<ClusterNode> nodes = ctx.grid().forDataNodes(name()).nodes(); if (nodes.isEmpty()) return new GridFinishedFuture<>(ctx.kernalContext()); @@ -3957,7 +3963,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } } else { - Collection<ClusterNode> nodes = ctx.grid().forCacheNodes(name()).nodes(); + Collection<ClusterNode> nodes = ctx.grid().forDataNodes(name()).nodes(); if (nodes.isEmpty()) return new GridFinishedFuture<>(ctx.kernalContext());