Ignore:
Timestamp:
2016-07-24T00:19:35+02:00 (4 years ago)
Author:
Don-vip
Message:

see #11390 - Java 8: use List.sort(Comparator) instead of Collections.sort(list, Comparator)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r10615 r10619  
    77import java.util.ArrayList;
    88import java.util.Collection;
    9 import java.util.Collections;
    109import java.util.Comparator;
    1110import java.util.List;
     
    110109        List<T> result = new ArrayList<>(primitives.size());
    111110        result.addAll(primitives);
    112         Collections.sort(result, byIdComparator);
     111        result.sort(byIdComparator);
    113112        return result;
    114113    }
     
    269268            }
    270269            List<Entry<String, String>> entries = new ArrayList<>(osm.getKeys().entrySet());
    271             Collections.sort(entries, byKeyComparator);
     270            entries.sort(byKeyComparator);
    272271            for (Entry<String, String> e : entries) {
    273272                out.println("    <tag k='"+ XmlWriter.encode(e.getKey()) +
Note: See TracChangeset for help on using the changeset viewer.