ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [4/8] ignite git commit: IGNITE-2541: Fixed potential NPE in GridCacheUpdateAtomicResult caused by unsafe [long -> Long -> long] transitions.
Date Thu, 04 Feb 2016 08:00:11 GMT
IGNITE-2541: Fixed potential NPE in GridCacheUpdateAtomicResult caused by unsafe [long ->
Long -> long] transitions.


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

Branch: refs/heads/ignite-2523
Commit: 10a2b7a18de3d9e0cb3fdf147956c127fa4d4d2b
Parents: 74d9d05
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Feb 4 09:41:26 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Feb 4 09:41:26 2016 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheMapEntry.java      | 4 ++--
 .../internal/processors/cache/GridCacheUpdateAtomicResult.java   | 4 ++--
 .../cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java  | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/10a2b7a1/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 64cfd01..ae40295 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
@@ -2135,7 +2135,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
                         null,
                         null,
                         false,
-                        updateCntr0 == null ? 0 : updateCntr);
+                        updateCntr0 == null ? 0 : updateCntr0);
                 }
             }
             else
@@ -2431,7 +2431,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
             enqueueVer,
             conflictCtx,
             true,
-            updateCntr0);
+            updateCntr0 == null ? 0 : updateCntr0);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/10a2b7a1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateAtomicResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateAtomicResult.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateAtomicResult.java
index 9df476e..2355b7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateAtomicResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUpdateAtomicResult.java
@@ -58,7 +58,7 @@ public class GridCacheUpdateAtomicResult {
     private final boolean sndToDht;
 
     /** */
-    private final Long updateCntr;
+    private final long updateCntr;
 
     /** Value computed by entry processor. */
     private IgniteBiTuple<Object, Exception> res;
@@ -137,7 +137,7 @@ public class GridCacheUpdateAtomicResult {
     /**
      * @return Partition update index.
      */
-    public Long updateCounter() {
+    public long updateCounter() {
         return updateCntr;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/10a2b7a1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
index e31af19..06c8441 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicUpdateFuture.java
@@ -225,7 +225,7 @@ public class GridDhtAtomicUpdateFuture extends GridFutureAdapter<Void>
         @Nullable GridCacheVersion conflictVer,
         boolean addPrevVal,
         @Nullable CacheObject prevVal,
-        @Nullable Long updateCntr) {
+        long updateCntr) {
         AffinityTopologyVersion topVer = updateReq.topologyVersion();
 
         Collection<ClusterNode> dhtNodes = cctx.dht().topology().nodes(entry.partition(),
topVer);


Mime
View raw message