Changeset 12184 in josm for trunk


Ignore:
Timestamp:
2017-05-15T19:34:30+02:00 (7 years ago)
Author:
michael2402
Message:

Do not rely on the List cast, wrap the collection in an array list instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java

    r12156 r12184  
    1010import java.io.IOException;
    1111import java.nio.charset.StandardCharsets;
    12 import java.util.List;
     12import java.util.ArrayList;
    1313
    1414import org.junit.Test;
     
    5151        assertEquals(903, result.getWaypoints().size());
    5252
    53         final WayPoint tenthWayPoint = ((List<WayPoint>) result.waypoints).get(10);
     53        final WayPoint tenthWayPoint = new ArrayList<>(result.getWaypoints()).get(10);
    5454        assertEquals("128970", tenthWayPoint.get(GpxData.GPX_NAME));
    5555        assertEquals(new LatLon(48.183956146240234, 11.43463134765625), tenthWayPoint.getCoor());
Note: See TracChangeset for help on using the changeset viewer.