ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [35/50] ignite git commit: IGNITE-4347: ODBC: Fixed NPE in OdbcRequestHandler appearing when cache doesn't exist. This closes #1305.
Date Tue, 06 Dec 2016 08:40:32 GMT
IGNITE-4347: ODBC: Fixed NPE in OdbcRequestHandler appearing when cache doesn't exist. This
closes #1305.


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

Branch: refs/heads/ignite-comm-balance-master
Commit: af24a9e2c3b61dff7c9116f1a3bea8c398b7ce78
Parents: 4ba8fcd
Author: isapego <igorsapg@gmail.com>
Authored: Fri Dec 2 12:35:13 2016 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Fri Dec 2 12:35:13 2016 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/odbc/OdbcRequestHandler.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/af24a9e2/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
index 32fb9db..ea3ae8b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcRequestHandler.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.odbc;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.cache.query.QueryCursor;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
@@ -199,13 +198,13 @@ public class OdbcRequestHandler {
             qry.setDistributedJoins(distributedJoins);
             qry.setEnforceJoinOrder(enforceJoinOrder);
 
-            IgniteCache<Object, Object> cache = ctx.grid().cache(req.cacheName()).withKeepBinary();
+            IgniteCache<Object, Object> cache = ctx.grid().cache(req.cacheName());
 
             if (cache == null)
-                return new OdbcResponse(OdbcResponse.STATUS_FAILED,
-                    "Cache doesn't exist (did you configure it?): " + req.cacheName());
+                return new OdbcResponse(OdbcResponse.STATUS_FAILED, "Cache doesn't exist
(did you configure it?): " +
+                    req.cacheName());
 
-            QueryCursor qryCur = cache.query(qry);
+            QueryCursor qryCur = cache.withKeepBinary().query(qry);
 
             qryCursors.put(qryId, new IgniteBiTuple<QueryCursor, Iterator>(qryCur,
null));
 


Mime
View raw message