Changeset 12800 in josm


Ignore:
Timestamp:
2017-09-09T14:22:07+02:00 (20 months ago)
Author:
Don-vip
Message:

see #15229 - see #15182 - deprecate OsmWriter.writeLayer(OsmDataLayer) - replacement: OsmWriter.write(DataSet)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/importexport/OsmExporter.java

    r12671 r12800  
    131131            layer.data.getReadLock().lock();
    132132            try {
    133                 w.writeLayer(layer);
     133                w.write(layer.data);
    134134            } finally {
    135135                layer.data.getReadLock().unlock();
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r12735 r12800  
    130130    }
    131131
     132    /**
     133     * Writes the full OSM file for the given layer (header, data sources, osm data).
     134     * @param layer OSM data layer
     135     * @deprecated To be removed end of 2017. Use {@link #write(DataSet)} instead
     136     */
     137    @Deprecated
    132138    public void writeLayer(OsmDataLayer layer) {
    133         header(layer.data.getUploadPolicy());
    134         writeDataSources(layer.data);
    135         writeContent(layer.data);
     139        write(layer.data);
     140    }
     141
     142    /**
     143     * Writes the full OSM file for the given data set (header, data sources, osm data).
     144     * @param data OSM data set
     145     * @since 12800
     146     */
     147    public void write(DataSet data) {
     148        header(data.getUploadPolicy());
     149        writeDataSources(data);
     150        writeContent(data);
    136151        footer();
    137152    }
  • trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java

    r9983 r12800  
    3232        layer.data.getReadLock().lock();
    3333        try {
    34             w.writeLayer(layer);
     34            w.write(layer.data);
    3535            w.flush();
    3636        } finally {
  • trunk/test/unit/org/openstreetmap/josm/gui/util/MultiLineFlowLayoutTest.java

    r12799 r12800  
    1313import org.junit.Rule;
    1414import org.junit.Test;
    15 import org.openstreetmap.josm.gui.util.MultiLineFlowLayout;
    1615import org.openstreetmap.josm.testutils.JOSMTestRules;
    1716
Note: See TracChangeset for help on using the changeset viewer.