Changeset 16953 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2020-08-29T07:53:11+02:00 (4 years ago)
Author:
simon04
Message:

Java 8: use Comparator.comparing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java

    r15497 r16953  
    142142        List<String> ways = osm.getWays().stream()
    143143                .map(w -> Integer.toString(w.getNodes().size()) + ":" + w.getKeys().entrySet().stream()
    144                         .sorted((e1, e2) -> e1.getKey().compareTo(e2.getKey())).collect(Collectors.toList()).toString())
     144                        .sorted(Comparator.comparing(Map.Entry::getKey)).collect(Collectors.toList()).toString())
    145145                .sorted()
    146146                .collect(Collectors.toList());
     
    148148        List<String> waysExpected = osmExpected.getWays().stream()
    149149                .map(w -> Integer.toString(w.getNodes().size()) + ":" + w.getKeys().entrySet().stream()
    150                         .sorted((e1, e2) -> e1.getKey().compareTo(e2.getKey())).collect(Collectors.toList()).toString())
     150                        .sorted(Comparator.comparing(Map.Entry::getKey)).collect(Collectors.toList()).toString())
    151151                .sorted()
    152152                .collect(Collectors.toList());
Note: See TracChangeset for help on using the changeset viewer.