Changeset 33762 in osm for applications


Ignore:
Timestamp:
2017-11-03T02:12:40+01:00 (7 years ago)
Author:
donvip
Message:

http://errorprone.info/bugpattern/JdkObsolete: use ArrayList instead of LinkedList

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java

    r33313 r33762  
    1111import java.awt.event.MouseEvent;
    1212import java.net.URL;
     13import java.util.ArrayList;
    1314import java.util.Collections;
    14 import java.util.LinkedList;
    1515import java.util.List;
    1616
     
    140140        tileSource = new OsmTileSource.Mapnik();
    141141        tileController = new TileController(tileSource, tileCache, this);
    142         mapMarkerList = Collections.synchronizedList(new LinkedList<MapMarker>());
    143         mapPolygonList = Collections.synchronizedList(new LinkedList<MapPolygon>());
    144         mapRectangleList = Collections.synchronizedList(new LinkedList<MapRectangle>());
     142        mapMarkerList = Collections.synchronizedList(new ArrayList<MapMarker>());
     143        mapPolygonList = Collections.synchronizedList(new ArrayList<MapPolygon>());
     144        mapRectangleList = Collections.synchronizedList(new ArrayList<MapRectangle>());
    145145        mapMarkersVisible = true;
    146146        mapRectanglesVisible = true;
     
    770770        List<? extends ICoordinate> coords = polygon.getPoints();
    771771        if (coords != null && coords.size() >= 3) {
    772             List<Point> points = new LinkedList<>();
     772            List<Point> points = new ArrayList<>();
    773773            for (ICoordinate c : coords) {
    774774                Point p = getMapPosition(c, false);
     
    782782                int tilesize = tileSource.getTileSize();
    783783                int mapSize = tilesize << zoom;
    784                 List<Point> pointsWrapped = new LinkedList<>(points);
     784                List<Point> pointsWrapped = new ArrayList<>(points);
    785785                boolean keepWrapping = true;
    786786                while (keepWrapping) {
     
    793793                    polygon.paint(g, pointsWrapped);
    794794                }
    795                 pointsWrapped = new LinkedList<>(points);
     795                pointsWrapped = new ArrayList<>(points);
    796796                keepWrapping = true;
    797797                while (keepWrapping) {
Note: See TracChangeset for help on using the changeset viewer.