Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2019-02-02 07:56:42 +0000
committerEike Stepper2019-02-02 07:56:42 +0000
commit86157bcc07f74557fee87e30a7b230fada8f4cd8 (patch)
treeb1cb53be85e168dc6fbab3b463371086f0806e9a /plugins/org.eclipse.emf.cdo.common/src
parent7217380110c2353c2a6df073614f3a046135952f (diff)
downloadcdo-86157bcc07f74557fee87e30a7b230fada8f4cd8.tar.gz
cdo-86157bcc07f74557fee87e30a7b230fada8f4cd8.tar.xz
cdo-86157bcc07f74557fee87e30a7b230fada8f4cd8.zip
[544057] CDOObject.cdoReadLock().isLockedByOthers() returns true if lock is held by myself
https://bugs.eclipse.org/bugs/show_bug.cgi?id=544057
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.common/src')
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/lock/CDOLockStateImpl.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/lock/CDOLockStateImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/lock/CDOLockStateImpl.java
index d340ca8cf3..bd6a11d9e8 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/lock/CDOLockStateImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/lock/CDOLockStateImpl.java
@@ -120,12 +120,7 @@ public class CDOLockStateImpl implements InternalCDOLockState
return false;
}
- if (!others)
- {
- return readLockOwners.contains(by);
- }
-
- return true;
+ return readLockOwners.contains(by) ^ others;
}
private boolean isWriteLocked(CDOLockOwner by, boolean others)

Back to the top