diff options
author | Stephan Herrmann | 2010-04-06 10:59:02 +0000 |
---|---|---|
committer | Stephan Herrmann | 2010-04-06 10:59:02 +0000 |
commit | 45b3f30f193d4c7d10ffa9fb452ed21492b0d1b5 (patch) | |
tree | 4fe4da26d6fd59d8fd4c54598281bcfad613e7fa /othersrc | |
parent | b07fe7ee883d2328a3de49f23c3d17b37286c313 (diff) | |
download | org.eclipse.objectteams-45b3f30f193d4c7d10ffa9fb452ed21492b0d1b5.tar.gz org.eclipse.objectteams-45b3f30f193d4c7d10ffa9fb452ed21492b0d1b5.tar.xz org.eclipse.objectteams-45b3f30f193d4c7d10ffa9fb452ed21492b0d1b5.zip |
proposed patch for bug 308181.
Diffstat (limited to 'othersrc')
-rw-r--r-- | othersrc/OTRE/src/org/objectteams/DoublyWeakHashMap.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/othersrc/OTRE/src/org/objectteams/DoublyWeakHashMap.java b/othersrc/OTRE/src/org/objectteams/DoublyWeakHashMap.java index bbf4ef8e6..05a2f91fa 100644 --- a/othersrc/OTRE/src/org/objectteams/DoublyWeakHashMap.java +++ b/othersrc/OTRE/src/org/objectteams/DoublyWeakHashMap.java @@ -65,13 +65,13 @@ public class DoublyWeakHashMap<K,V> implements Map<K,V> { } // used from migrateToBase() and lifting constructor - public V put(K key, V value) { + public synchronized V put(K key, V value) { this.map.put(key, new WeakReference<V>(value)); return value; } // used from unregisterRole(), migrateToBase() - public V remove(Object key) { + public synchronized V remove(Object key) { WeakReference<V> value = this.map.remove(key); return (value == null) ? null : value.get(); } @@ -90,7 +90,7 @@ public class DoublyWeakHashMap<K,V> implements Map<K,V> { } // used from getAllRoles() et al. - public Collection<V> values() { + public synchronized Collection<V> values() { ArrayList<V> result = new ArrayList<V>(this.map.size()); for (WeakReference<V> valRef : this.map.values()) { V value = valRef.get(); |