ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/8] ignite git commit: fixed npe
Date Wed, 02 Dec 2015 12:53:36 GMT
fixed npe


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

Branch: refs/heads/ignite-1537
Commit: 022cdafec2f23651c8de82ae7bd9bd5f37999e21
Parents: b274a5c
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Tue Dec 1 16:36:59 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Tue Dec 1 16:36:59 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/near/GridNearGetFuture.java       | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/022cdafe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 3f61b2f..9705569 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -264,11 +264,13 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
                 if (!success) {
                     GridCacheVersion obsolete = cctx.versions().next(topVer);
 
-                    for (GridNearCacheEntry reserved : savedEntries.values()) {
-                        reserved.releaseEviction();
+                    if (savedEntries != null) {
+                        for (GridNearCacheEntry reserved : savedEntries.values()) {
+                            reserved.releaseEviction();
 
-                        if (reserved.markObsolete(obsolete))
-                            reserved.context().cache().removeEntry(reserved);
+                            if (reserved.markObsolete(obsolete))
+                                reserved.context().cache().removeEntry(reserved);
+                        }
                     }
                 }
             }
@@ -543,7 +545,7 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
                         }
                         else {
                             K key0 = (K)cctx.unwrapPortableIfNeeded(key, !deserializePortable,
false);
-                            V val0 = !skipVals ? 
+                            V val0 = !skipVals ?
                                 (V)cctx.unwrapPortableIfNeeded(v, !deserializePortable, false)
:
                                 (V)Boolean.TRUE;
 


Mime
View raw message