Changeset 197 in josm


Ignore:
Timestamp:
2007-01-14T05:00:46+01:00 (18 years ago)
Author:
imi
Message:
  • fixed a bug in merging code (hopefully the same that causes the exception in conflict dialog)
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/data/ServerSidePreferences.java

    r196 r197  
    9999         * Do nothing on load. Preferences are loaded with download().
    100100         */
    101         @Override public void load() throws IOException {
     101        @Override public void load() {
    102102        }
    103103
  • src/org/openstreetmap/josm/data/osm/visitor/MergeVisitor.java

    r159 r197  
    8282         */
    8383        public void visit(Segment other) {
    84                 if (other.incomplete)
    85                         return; // won't merge in an incomplete line segment!
    86                
    8784                if (mergeAfterId(mergedSegments, ds.segments, other))
    8885                        return;
  • test/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java

    r187 r197  
    11package org.openstreetmap.josm.data.osm.visitor;
    22
     3import java.util.Arrays;
    34import java.util.Date;
    45
     
    4142    }
    4243
     44        private Way createWay(long id, Date timestamp, Segment... segments) {
     45                Way w = new Way();
     46                w.id = id;
     47                w.segments.addAll(Arrays.asList(segments));
     48                w.timestamp = timestamp;
     49                return w;
     50        }
    4351
    4452        /**
     
    307315        }
    308316       
     317        public void testMergeIncompleteSegmentsAddToDataSet() throws Exception {
     318                DataSet ds = new DataSet();
     319                MergeVisitor v = new MergeVisitor(ds);
     320                v.visit(createSegment(null, true, false, 1));
     321                assertEquals(1, ds.segments.size());
     322    }
     323       
    309324}
Note: See TracChangeset for help on using the changeset viewer.