IGNITE-379 Fix NPE. (cherry picked from commit 6d0d4ed)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/69b52dfc Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/69b52dfc Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/69b52dfc Branch: refs/heads/ignite-471 Commit: 69b52dfc96d04751a260d9aedb1e9a3a466d20c0 Parents: 22bdbce Author: sevdokimov <sevdoki...@gridgain.com> Authored: Tue Mar 24 14:27:27 2015 +0300 Committer: sevdokimov <sevdoki...@gridgain.com> Committed: Tue Mar 24 15:13:39 2015 +0300 ---------------------------------------------------------------------- .../internal/processors/cache/GridCacheStoreManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/69b52dfc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java index 27428a7..5ac0d39 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManager.java @@ -786,11 +786,11 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter { * Clears session holder. */ void endSession(@Nullable IgniteInternalTx tx) { - if (sesHolder != null) - sesHolder.set(null); - if (tx == null) store.sessionEnd(true); + + if (sesHolder != null) + sesHolder.set(null); } /** @@ -800,6 +800,8 @@ public class GridCacheStoreManager extends GridCacheManagerAdapter { if (sesHolder == null) return; + assert sesHolder.get() == null; + SessionData ses; if (tx != null) {