Ignore:
Timestamp:
2017-09-15T01:20:41+02:00 (7 years ago)
Author:
Don-vip
Message:

see #11390 - SonarQube - squid:S3824 - "Map.get" and value test should be replaced with single method call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java

    r12765 r12865  
    6868            String deduplicationKey = getCacheKey();
    6969            synchronized (inProgress) {
    70                 Set<TileLoaderListener> newListeners = inProgress.get(deduplicationKey);
    71                 if (newListeners == null) {
    72                     newListeners = new HashSet<>();
    73                     inProgress.put(deduplicationKey, newListeners);
    74                 }
    75                 newListeners.add(listener);
     70                inProgress.computeIfAbsent(deduplicationKey, k -> new HashSet<>()).add(listener);
    7671            }
    7772        }
Note: See TracChangeset for help on using the changeset viewer.