Changeset 11176 in josm
- Timestamp:
- 2016-10-27T00:32:49+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r11175 r11176 16 16 17 17 import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException; 18 import org.openstreetmap.josm.data.conflict.Conflict;19 18 import org.openstreetmap.josm.data.conflict.ConflictCollection; 20 19 import org.openstreetmap.josm.data.osm.DataSet; … … 22 21 import org.openstreetmap.josm.data.osm.Node; 23 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 24 import org.openstreetmap.josm.data.osm.OsmPrimitiveComparator;25 23 import org.openstreetmap.josm.data.osm.PrimitiveId; 26 24 import org.openstreetmap.josm.data.osm.Relation; … … 78 76 } 79 77 } 80 OsmPrimitiveComparator c = new OsmPrimitiveComparator(false, true); 81 toDelete.sort(c); 82 toAdd.sort(c); 83 toUpdate.sort(c); 78 final Comparator<OsmPrimitive> orderingNodesWaysRelations = Comparator.comparingInt(osm -> osm.getType().ordinal()); 79 final Comparator<OsmPrimitive> byUniqueId = Comparator.comparing(OsmPrimitive::getUniqueId); 80 toAdd.sort(orderingNodesWaysRelations.thenComparing(byUniqueId)); 81 toUpdate.sort(orderingNodesWaysRelations.thenComparing(byUniqueId)); 82 toDelete.sort(orderingNodesWaysRelations.reversed().thenComparing(byUniqueId)); 84 83 } 85 84
Note:
See TracChangeset
for help on using the changeset viewer.