Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6471118DF4 for ; Thu, 4 Feb 2016 23:43:47 +0000 (UTC) Received: (qmail 511 invoked by uid 500); 4 Feb 2016 23:43:47 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 474 invoked by uid 500); 4 Feb 2016 23:43:47 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 462 invoked by uid 99); 4 Feb 2016 23:43:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2016 23:43:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1FF04E0B2A; Thu, 4 Feb 2016 23:43:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.apache.org Date: Thu, 04 Feb 2016 23:43:49 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/6] ignite git commit: IGNITE-2541: Fixed potential NPE in GridCacheUpdateAtomicResult caused by unsafe [long -> Long -> long] transitions. 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-2450 Commit: 10a2b7a18de3d9e0cb3fdf147956c127fa4d4d2b Parents: 74d9d05 Author: vozerov-gridgain Authored: Thu Feb 4 09:41:26 2016 +0300 Committer: vozerov-gridgain 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 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 @Nullable GridCacheVersion conflictVer, boolean addPrevVal, @Nullable CacheObject prevVal, - @Nullable Long updateCntr) { + long updateCntr) { AffinityTopologyVersion topVer = updateReq.topologyVersion(); Collection dhtNodes = cctx.dht().topology().nodes(entry.partition(), topVer);