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/cache/HostLimitQueue.java

    r12620 r12865  
    159159        if (limit == null) {
    160160            synchronized (hostSemaphores) {
    161                 limit = hostSemaphores.get(host);
    162                 if (limit == null) {
    163                     limit = new Semaphore(hostLimit);
    164                     hostSemaphores.put(host, limit);
    165                 }
     161                limit = hostSemaphores.computeIfAbsent(host, k -> new Semaphore(hostLimit));
    166162            }
    167163        }
Note: See TracChangeset for help on using the changeset viewer.