ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/3] ignite git commit: IGNITE-4347: Fixed NPE.
Date Mon, 05 Dec 2016 11:59:17 GMT
IGNITE-4347: Fixed NPE.


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

Branch: refs/heads/master
Commit: b4aedfd5350b4a318f1608596a171789513835a4
Parents: cc13d9d
Author: Igor Sapego <isapego@gridgain.com>
Authored: Fri Dec 2 20:10:09 2016 +0300
Committer: Igor Sapego <isapego@gridgain.com>
Committed: Fri Dec 2 20:10:09 2016 +0300

----------------------------------------------------------------------
 .../internal/processors/odbc/OdbcRequestHandler.java      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4aedfd5/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 eef9945..0a70a68 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
@@ -184,11 +184,17 @@ public class OdbcRequestHandler {
             qry.setDistributedJoins(distributedJoins);
             qry.setEnforceJoinOrder(enforceJoinOrder);
 
-            IgniteCache<Object, Object> cache = ctx.grid().cache(req.cacheName());
+            IgniteCache<Object, Object> cache0 = ctx.grid().cache(req.cacheName());
+
+            if (cache0 == null)
+                return new OdbcResponse(OdbcResponse.STATUS_FAILED,
+                        "Cache doesn't exist (did you configure it?): " + req.cacheName());
+
+            IgniteCache<Object, Object> cache = cache0.withKeepBinary();
 
             if (cache == null)
                 return new OdbcResponse(OdbcResponse.STATUS_FAILED,
-                    "Cache doesn't exist (did you configure it?): " + req.cacheName());
+                    "Can not get cache with keep binary: " + req.cacheName());
 
             QueryCursor qryCur = cache.query(qry);
 


Mime
View raw message