synchronize hashmap lookups

This commit is contained in:
Tahg 2011-02-23 22:52:14 -05:00
parent edb0debd16
commit 280880d163

View file

@ -40,8 +40,10 @@ public class LongHashtable<V> extends LongHash
}
public V get(long key) {
synchronized(this) {
return containsKey(key) ? (V) cache.value : null;
}
}
public boolean containsKey(long key) {
if (cache != null && cache.key == key)