diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java index 1e66d60e5..7d66bf8a7 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/service/WatchQueueReader.java @@ -41,6 +41,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; @@ -72,8 +73,8 @@ public class WatchQueueReader implements Runnable { protected @Nullable WatchService watchService; private final Map registeredKeys = new HashMap<>(); - private final Map> keyToService = new HashMap<>(); - private final Map> hashes = new HashMap<>(); + private final Map> keyToService = new ConcurrentHashMap<>(); + private final Map> hashes = new ConcurrentHashMap<>(); private final List notifications = new CopyOnWriteArrayList<>(); private @Nullable Thread qr;