Ignore:
Timestamp:
27.02.2010 15:46:00 (2 years ago)
Author:
jttt
Message:

Fix tests

File:
1 edited

Legend:

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

    r3040 r3053  
    149149 
    150150    /** 
    151      * A way in the target dataset might be incomplete because at least one of its nodes is incomplete. 
    152      * The nodes might have become complete because a complete node was merged into in the 
    153      * merge operation. 
    154      * 
    155      * This method loops over all parent ways of such nodes and turns them into complete ways 
    156      * if necessary. 
    157      * 
    158      * @param other 
    159      */ 
    160     //TODO This method is probably useless 
    161     protected void fixIncompleteParentWays(Node other) { 
    162         Node myNode = (Node)getMergeTarget(other); 
    163         if (myNode == null) 
    164             throw new RuntimeException(tr("Missing merge target for node with id {0}", other.getUniqueId())); 
    165         if (myNode.isIncomplete() || myNode.isDeleted() || !myNode.isVisible()) return; 
    166     } 
    167  
    168     /** 
    169151     * Postprocess the dataset and fix all merged references to point to the actual 
    170152     * data. 
     
    188170            targetDataSet.unlinkReferencesToPrimitive(target); 
    189171        } 
    190         // objectsWithChildrenToMerge also includes complete nodes which have 
    191         // been merged into their incomplete equivalents. 
    192         // 
    193         for (PrimitiveId id: objectsWithChildrenToMerge) { 
    194             if (!id.getType().equals(OsmPrimitiveType.NODE)) { 
    195                 continue; 
    196             } 
    197             Node n = (Node)sourceDataSet.getPrimitiveById(id); 
    198             if (!conflicts.hasConflictForTheir(n)) { 
    199                 fixIncompleteParentWays(n); 
    200             } 
    201         } 
    202  
    203172    } 
    204173 
Note: See TracChangeset for help on using the changeset viewer.