mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-01 00:10:40 +01:00
Remove concurrent hashmap because it cannot handle null values.
Need to use another approach if concurrency is required.
This commit is contained in:
parent
d831722821
commit
f68af5529f
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -12,7 +13,6 @@ import java.util.Map.Entry;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -51,9 +51,9 @@ public class IslandCache {
|
|||||||
private final @NonNull Database<Island> handler;
|
private final @NonNull Database<Island> handler;
|
||||||
|
|
||||||
public IslandCache(@NonNull Database<Island> handler) {
|
public IslandCache(@NonNull Database<Island> handler) {
|
||||||
islandsById = new ConcurrentHashMap<>();
|
islandsById = new HashMap<>();
|
||||||
islandsByUUID = new ConcurrentHashMap<>();
|
islandsByUUID = new HashMap<>();
|
||||||
grids = new ConcurrentHashMap<>();
|
grids = new HashMap<>();
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user