mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
synchronize hashmap lookups
This commit is contained in:
parent
edb0debd16
commit
280880d163
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue