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/APIDataSet.java

    r12673 r12865  
    282282
    283283        public Set<Relation> getChildren(Relation relation) {
    284             Set<Relation> p = children.get(relation);
    285             if (p == null) {
    286                 p = new HashSet<>();
    287                 children.put(relation, p);
    288             }
    289             return p;
     284            return children.computeIfAbsent(relation, k -> new HashSet<>());
    290285        }
    291286
Note: See TracChangeset for help on using the changeset viewer.