ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-8147: SQL: fixed NPE during DELETE statement execution.
Date Thu, 05 Apr 2018 12:27:59 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 54096d7c6 -> 1dded3ae8


IGNITE-8147: SQL: fixed NPE during DELETE statement execution.


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

Branch: refs/heads/master
Commit: 1dded3ae8fe21bc25f09d597b808ce409271cd42
Parents: 54096d7
Author: devozerov <vozerov@gridgain.com>
Authored: Thu Apr 5 15:27:44 2018 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Apr 5 15:27:44 2018 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheContext.java       | 4 ++++
 .../ignite/internal/processors/cache/GridCacheMapEntry.java      | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1dded3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 9eb4340..f194423 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -1841,6 +1841,10 @@ public class GridCacheContext<K, V> implements Externalizable
{
      * @throws IgniteCheckedException, If validation fails.
      */
     public void validateKeyAndValue(KeyCacheObject key, CacheObject val) throws IgniteCheckedException
{
+        // No validation for removal.
+        if (val == null)
+            return;
+
         if (!isQueryEnabled())
             return;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/1dded3ae/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index bc0e954..74dabe9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -1489,8 +1489,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
 
                         updated = cctx.toCacheObject(updated0);
 
-                        if (updated != null) // no validation for remove case
-                            cctx.validateKeyAndValue(key, updated);
+                        cctx.validateKeyAndValue(key, updated);
                     }
                     else
                         updated = old;


Mime
View raw message