You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/09/08 14:45:56 UTC

[14/50] ignite git commit: fix checks

fix checks


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

Branch: refs/heads/ignite-3199-1
Commit: 4d7676964342239fc51760967077aedab257d9f2
Parents: 4a4ab88
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Sep 5 18:25:57 2016 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Sep 5 18:25:57 2016 +0300

----------------------------------------------------------------------
 .../processors/platform/websession/UnlockEntryProcessor.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4d767696/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/UnlockEntryProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/UnlockEntryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/UnlockEntryProcessor.java
index d9be048..79b9c3b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/UnlockEntryProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/websession/UnlockEntryProcessor.java
@@ -38,8 +38,11 @@ public class UnlockEntryProcessor implements CacheEntryProcessor<String, Session
 
         LockInfo lockInfo = (LockInfo)objects[0];
 
-        assert data.getLockNodeId().equals(lockInfo.getLockNodeId());
-        assert data.getLockId() == lockInfo.getLockId();
+        if (!data.getLockNodeId().equals(lockInfo.getLockNodeId()))
+            throw new IllegalStateException("Can not unlock session data: lock node id check failed.");
+
+        if (data.getLockId() != lockInfo.getLockId())
+            throw new IllegalStateException("Can not unlock session data: lock id check failed.");
 
         // Unlock.
         data.setLockNodeId(null);