Index: trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 15523)
+++ trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 15525)
@@ -130,7 +130,5 @@
         Semaphore limit = hostSemaphores.get(host);
         if (limit == null) {
-            synchronized (hostSemaphores) {
-                limit = hostSemaphores.computeIfAbsent(host, k -> new Semaphore(hostLimit));
-            }
+            limit = hostSemaphores.computeIfAbsent(host, k -> new Semaphore(hostLimit));
         }
         return limit;
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 15523)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 15525)
@@ -153,13 +153,8 @@
             throw new IllegalArgumentException("No url returned");
         }
-        synchronized (inProgress) {
-            Set<ICachedLoaderListener> newListeners = inProgress.get(deduplicationKey);
-            if (newListeners == null) {
-                newListeners = new HashSet<>();
-                inProgress.put(deduplicationKey, newListeners);
-                first = true;
-            }
-            newListeners.add(listener);
-        }
+        synchronized (this) {
+            first = !inProgress.containsKey(deduplicationKey);
+        }
+        inProgress.computeIfAbsent(deduplicationKey, k -> new HashSet<>()).add(listener);
 
         if (first || force) {
@@ -250,11 +245,9 @@
     private void finishLoading(LoadResult result) {
         Set<ICachedLoaderListener> listeners;
-        synchronized (inProgress) {
-            try {
-                listeners = inProgress.remove(getUrl().toString());
-            } catch (IOException e) {
-                listeners = null;
-                Logging.trace(e);
-            }
+        try {
+            listeners = inProgress.remove(getUrl().toString());
+        } catch (IOException e) {
+            listeners = null;
+            Logging.trace(e);
         }
         if (listeners == null) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 15523)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 15525)
@@ -76,8 +76,5 @@
         this.options = options;
         if (listener != null) {
-            String deduplicationKey = getCacheKey();
-            synchronized (inProgress) {
-                inProgress.computeIfAbsent(deduplicationKey, k -> new HashSet<>()).add(listener);
-            }
+            inProgress.computeIfAbsent(getCacheKey(), k -> new HashSet<>()).add(listener);
         }
     }
@@ -162,8 +159,5 @@
     public void loadingFinished(CacheEntry object, CacheEntryAttributes attributes, LoadResult result) {
         this.attributes = attributes; // as we might get notification from other object than our selfs, pass attributes along
-        Set<TileLoaderListener> listeners;
-        synchronized (inProgress) {
-            listeners = inProgress.remove(getCacheKey());
-        }
+        Set<TileLoaderListener> listeners = inProgress.remove(getCacheKey());
         boolean status = result == LoadResult.SUCCESS;
 
