Changeset 18957 in josm for trunk


Ignore:
Timestamp:
2024-01-24T16:24:20+01:00 (11 months ago)
Author:
GerdP
Message:

see #20405: simplify code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/AbstractParser.java

    r18956 r18957  
    186186        RelationMemberData member = new RelationMemberData(role, type, ref);
    187187        // see #20405: cache equal instances of members
    188         RelationMemberData cachedMember = memberCache .putIfAbsent(member, member);
    189         if (cachedMember == null)
    190             cachedMember = member;
     188        RelationMemberData cachedMember = memberCache.computeIfAbsent(member, m -> m);
    191189        ((HistoryRelation) currentPrimitive).addMember(cachedMember);
    192190    }
Note: See TracChangeset for help on using the changeset viewer.