Changeset 17283 in josm for trunk/src


Ignore:
Timestamp:
2020-10-29T17:56:01+01:00 (4 years ago)
Author:
GerdP
Message:

fix #19438: DataIntegrityProblemException: Deleted node referenced during conflict solving

  • use Way.calculateRemoveNodes() if way is not incomplete
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r17191 r17283  
    792792            Set<Way> result = new HashSet<>();
    793793            for (Way way : node.getParentWays()) {
    794                 List<Node> wayNodes = way.getNodes();
    795                 if (wayNodes.removeIf(node::equals)) {
     794                List<Node> wayNodes;
     795                if (!way.isIncomplete()) {
     796                    wayNodes = way.calculateRemoveNodes(Collections.singleton(node));
     797                } else {
     798                    wayNodes = way.getNodes();
     799                    wayNodes.removeIf(node::equals);
     800                }
     801                if (wayNodes.size() < way.getNodesCount()) {
    796802                    if (wayNodes.size() < 2) {
    797803                        deleteWay(way);
Note: See TracChangeset for help on using the changeset viewer.