Changeset 2498 in josm


Ignore:
Timestamp:
2009-11-22T12:45:38+01:00 (14 years ago)
Author:
jttt
Message:

Removed unnecessary setting of OsmPrimitive.incomplete

Location:
trunk
Files:
7 edited

Legend:

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

    r2433 r2498  
    6363    private DataSet outputDataSet;
    6464
    65     private boolean cancelled = false;
    66 
    6765    /**
    6866     * constructor
  • trunk/src/org/openstreetmap/josm/io/OsmReader.java

    r2497 r2498  
    438438                    if (n == null) {
    439439                        n = new Node(id);
    440                         n.incomplete = true;
    441440                        ds.addPrimitive(n);
    442441                    }
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r2401 r2498  
    5656        //
    5757        for (int i=0; i< numNodes; i++) {
    58             Node n = new Node(0);
     58            Node n = new Node();
    5959            n.setCoor(new LatLon(-36.6,47.6));
    6060            n.put("name", "node-"+i);
    61             n.incomplete = false;
    6261            ds.addPrimitive(n);
    6362            nodes.add(n);
     
    6867        //
    6968        for (int i=0; i< numWays; i++) {
    70             Way w = new Way(0);
    71             w.incomplete = false;
     69            Way w = new Way();
    7270            int numNodesInWay = 2 + (int)Math.round(Math.random() * 5);
    7371            int start = (int)Math.round(Math.random() * numNodes);
     
    8684        //
    8785        for (int i=0; i< numRelations; i++) {
    88             Relation r = new Relation(0);
    89             r.incomplete = false;
     86            Relation r = new Relation();
    9087            r.put("name", "relation-" +i);
    9188            int numNodesInRelation = (int)Math.round(Math.random() * 10);
     
    132129
    133130    @BeforeClass
    134     public static void  init() throws OsmTransferException, InterruptedException{
     131    public static void  init() throws OsmTransferException {
    135132        logger.info("initializing ...");
    136133        testProperties = new Properties();
  • trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java

    r2399 r2498  
    6262    protected static void populateTestDataSetWithNodes(DataSet ds) {
    6363        for (int i=0;i<100;i++) {
    64             Node n = new Node(0);
     64            Node n = new Node();
    6565            n.setCoor(new LatLon(-36.6,47.6));
    6666            n.put("name", "node-"+i);
    67             n.incomplete = false;
    6867            ds.addPrimitive(n);
    6968        }
     
    7271    protected static void populateTestDataSetWithWays(DataSet ds) {
    7372        for (int i=0;i<20;i++) {
    74             Way w = new Way(0);
    75             w.incomplete = false;
     73            Way w = new Way();
    7674            for (int j = 0; j < 10;j++) {
    7775                w.addNode(lookupNode(ds, i+j));
     
    8482    protected static void populateTestDataSetWithRelations(DataSet ds) {
    8583        for (int i=0;i<10;i++) {
    86             Relation r = new Relation(0);
    87             r.incomplete = false;
     84            Relation r = new Relation();
    8885            r.put("name", "relation-" +i);
    8986            for (int j =0; j < 10; j++) {
     
    139136
    140137    @BeforeClass
    141     public static void  init() throws OsmTransferException, InterruptedException{
     138    public static void  init() throws OsmTransferException {
    142139        logger.info("initializing ...");
    143140        testProperties = new Properties();
  • trunk/test/unit/org/openstreetmap/josm/data/osm/APIDataSetTest.java

    r2381 r2498  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.osm;
     3
     4import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.fail;
    36
    47import java.util.List;
    58
    69import org.junit.Test;
    7 import static org.junit.Assert.*;
    8 
    910import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException;
    1011import org.openstreetmap.josm.data.APIDataSet;
     
    1819        Relation r = new Relation();
    1920        r.put("name", "r1");
    20         r.incomplete = false;
    2121        DataSet ds = new DataSet();
    2222        ds.addPrimitive(r);
     
    3939        Relation r1 = new Relation();
    4040        r1.put("name", "r1");
    41         r1.incomplete = false;
    4241
    4342        Relation r2 = new Relation();
    4443        r2.put("name", "r2");
    45         r2.incomplete = false;
    4644
    4745        r1.addMember(new RelationMember("", r2));
     
    6967        Relation r1 = new Relation();
    7068        r1.put("name", "r1");
    71         r1.incomplete = false;
    7269
    7370        Relation r2 = new Relation();
    7471        r2.put("name", "r2");
    75         r2.incomplete = false;
    7672
    7773        Relation r3 = new Relation();
    7874        r3.put("name", "r3");
    79         r3.incomplete = false;
    8075
    8176        Relation r4 = new Relation(1);
     
    116111        Relation r1 = new Relation();
    117112        r1.put("name", "r1");
    118         r1.incomplete = false;
    119113
    120114        Relation r2 = new Relation();
    121115        r2.put("name", "r2");
    122         r2.incomplete = false;
    123116
    124117        Relation r3 = new Relation();
    125118        r3.put("name", "r3");
    126         r3.incomplete = false;
    127119
    128120        r1.addMember(new RelationMember("", r2));
     
    152144        Relation r1 = new Relation();
    153145        r1.put("name", "r1");
    154         r1.incomplete = false;
    155146
    156147        Relation r2 = new Relation();
    157148        r2.put("name", "r2");
    158         r2.incomplete = false;
    159149
    160150        Relation r3 = new Relation();
    161151        r3.put("name", "r3");
    162         r3.incomplete = false;
    163152
    164153        r1.addMember(new RelationMember("", r2));
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java

    r2471 r2498  
    10011001
    10021002        Way w3 = new Way(3);
    1003         w3.incomplete = true;
    10041003        w3.setNodes(Arrays.asList(n1,n2));
    10051004        their.addPrimitive(w3);
     
    10511050        // an incomplete way with two incomplete nodes
    10521051        Way w3 = new Way(3);
    1053         w3.incomplete = true;
    10541052        w3.setNodes(Arrays.asList(n1,n2));
    10551053        their.addPrimitive(w3);
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r2388 r2498  
    136136        DataSet source = new DataSet();
    137137        Way w1 = new Way(3);
    138         w1.incomplete = true;
    139138        source.addPrimitive(w1);
    140139        source.setSelected(w1);
Note: See TracChangeset for help on using the changeset viewer.