- Timestamp:
- 2024-01-24T14:11:38+01:00 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/AbstractParser.java
r17838 r18956 5 5 6 6 import java.time.Instant; 7 import java.util.HashMap; 8 import java.util.Map; 7 9 8 10 import org.openstreetmap.josm.data.coor.LatLon; … … 31 33 /** if true, replace user information in input by anonymous user */ 32 34 protected boolean useAnonymousUser; 35 private Map<RelationMemberData, RelationMemberData> memberCache = new HashMap<>(); 33 36 34 37 @Override … … 182 185 String role = getMandatoryAttributeString(atts, "role"); 183 186 RelationMemberData member = new RelationMemberData(role, type, ref); 184 ((HistoryRelation) currentPrimitive).addMember(member); 187 // see #20405: cache equal instances of members 188 RelationMemberData cachedMember = memberCache .putIfAbsent(member, member); 189 if (cachedMember == null) 190 cachedMember = member; 191 ((HistoryRelation) currentPrimitive).addMember(cachedMember); 185 192 } 186 193
Note:
See TracChangeset
for help on using the changeset viewer.