Ignore:
Timestamp:
2017-09-15T01:20:41+02:00 (9 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/tools/ImageProvider.java

    r12856 r12865  
    13221322
    13231323        synchronized (ROTATE_CACHE) {
    1324             Map<Long, Image> cacheByAngle = ROTATE_CACHE.get(img);
    1325             if (cacheByAngle == null) {
    1326                 cacheByAngle = new HashMap<>();
    1327                 ROTATE_CACHE.put(img, cacheByAngle);
    1328             }
    1329 
     1324            Map<Long, Image> cacheByAngle = ROTATE_CACHE.computeIfAbsent(img, k -> new HashMap<>());
    13301325            Image rotatedImg = cacheByAngle.get(originalAngle);
    13311326
Note: See TracChangeset for help on using the changeset viewer.