Repository: incubator-ignite
Updated Branches:
  refs/heads/sprint-1 156bd5aa4 -> c8a02892e


# sprint-1 check for null key for client GET_ALL request


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b0a7790d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b0a7790d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b0a7790d

Branch: refs/heads/sprint-1
Commit: b0a7790d45761ef6a82f8743cab7847ec9b0d3b4
Parents: 4563cce
Author: sboikov <sboi...@gridgain.com>
Authored: Fri Feb 13 10:27:20 2015 +0300
Committer: sboikov <sboi...@gridgain.com>
Committed: Fri Feb 13 10:27:20 2015 +0300

----------------------------------------------------------------------
 .../rest/handlers/cache/GridCacheCommandHandler.java     | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b0a7790d/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index 816d3b6..47af1ff 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -165,10 +165,17 @@ public class GridCacheCommandHandler extends 
GridRestCommandHandlerAdapter {
                         throw new 
IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("keys"));
 
                     // HashSet wrapping for correct serialization
-                    keys = new HashSet<>(keys);
+                    HashSet<Object> keys0 = new HashSet<>();
+
+                    for (Object getKey : keys) {
+                        if (getKey == null)
+                            throw new IgniteCheckedException("Failing getAll 
operation (null keys are not allowed).");
+
+                        keys0.add(getKey);
+                    }
 
                     fut = executeCommand(req.destinationId(), req.clientId(), 
cacheName, flags, key,
-                        new GetAllCommand(keys), req.portableMode());
+                        new GetAllCommand(keys0), req.portableMode());
 
                     break;
                 }

Reply via email to