summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2011-08-03 05:23:27 (EDT)
committerCaspar De Groot2011-08-03 05:23:27 (EDT)
commit731c4dd1fe5aa23bd7f613ce0e71e1e93cd89313 (patch)
treef9eac21572ea78e5a8a6b7858810ab04e409b8cd
parentb07671015f701c31a81ce190c586c983cdb174ee (diff)
downloadcdo-731c4dd1fe5aa23bd7f613ce0e71e1e93cd89313.zip
cdo-731c4dd1fe5aa23bd7f613ce0e71e1e93cd89313.tar.gz
cdo-731c4dd1fe5aa23bd7f613ce0e71e1e93cd89313.tar.bz2
[353690] RWOLockManager.changeContext neglects to update contextToLockStates map
https://bugs.eclipse.org/bugs/show_bug.cgi?id=353690
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWOLockManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWOLockManager.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWOLockManager.java
index 34e176e..979238a 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWOLockManager.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWOLockManager.java
@@ -183,6 +183,12 @@ public class RWOLockManager<OBJECT, CONTEXT> extends Lifecycle implements IRWLoc
{
lockState.replaceContext(oldContext, newContext);
}
+
+ Set<LockState<OBJECT, CONTEXT>> lockStates = contextToLockStates.remove(oldContext);
+ if (lockStates != null)
+ {
+ contextToLockStates.put(newContext, lockStates);
+ }
}
protected long currentTimeMillis()