ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/23] incubator-ignite git commit: # sprint-1 check for null key for client GET_ALL request
Date Fri, 13 Feb 2015 11:31:16 GMT
# 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/ignite-238
Commit: b0a7790d45761ef6a82f8743cab7847ec9b0d3b4
Parents: 4563cce
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Feb 13 10:27:20 2015 +0300
Committer: sboikov <sboikov@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;
                 }


Mime
View raw message