Ignore:
Timestamp:
2022-03-22T18:47:22+01:00 (3 years ago)
Author:
taylor.smock
Message:

fix #21765: Update deprecated functions in dataimport

Location:
applications/editors/josm/plugins/dataimport
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/dataimport/build.xml

    r34748 r35932  
    55    <property name="commit.message" value="Changed constructor signature, updated build.xml"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14456"/>
     7    <property name="plugin.main.version" value="15496"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java

    r34749 r35932  
    2020import org.openstreetmap.josm.data.coor.LatLon;
    2121import org.openstreetmap.josm.data.gpx.GpxData;
    22 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
     22import org.openstreetmap.josm.data.gpx.GpxTrack;
    2323import org.openstreetmap.josm.data.gpx.WayPoint;
    2424import org.openstreetmap.josm.gui.MainApplication;
     
    5757        try (
    5858            InputStream source = new FileInputStream(file);
    59             BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8));
    60          ) {
     59            BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8))) {
    6160            String line;
    6261            while ((line = rd.readLine()) != null) {
     
    7978            if (imported > 0) {
    8079                GpxData data = new GpxData();
    81                 data.tracks.add(new ImmutableGpxTrack(Collections.singleton(currentTrackSeg), Collections.<String, Object>emptyMap()));
     80                data.tracks.add(new GpxTrack(Collections.singleton(currentTrackSeg), Collections.emptyMap()));
    8281                data.recalculateBounds();
    8382                data.storageFile = file;
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java

    r35012 r35932  
    1818import org.openstreetmap.josm.data.coor.LatLon;
    1919import org.openstreetmap.josm.data.gpx.GpxData;
    20 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
     20import org.openstreetmap.josm.data.gpx.GpxTrack;
    2121import org.openstreetmap.josm.data.gpx.WayPoint;
    2222import org.openstreetmap.josm.gui.MainApplication;
     
    160160                                }
    161161                            }
    162                             gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
     162                            gpxData.tracks.add(new GpxTrack(currentTrack, Collections.emptyMap()));
    163163                        }
    164164                    }
     
    187187                        }
    188188                    }
    189                     gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
     189                    gpxData.tracks.add(new GpxTrack(currentTrack, Collections.emptyMap()));
    190190                }
    191191            }
Note: See TracChangeset for help on using the changeset viewer.