Ignore:
Timestamp:
2016-07-26T02:17:04+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390 - use functional comparators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r10627 r10647  
    2424import java.util.Collection;
    2525import java.util.Collections;
     26import java.util.Comparator;
    2627import java.util.HashMap;
    2728import java.util.HashSet;
     
    745746            // lower the value of "stage" the earlier the plugin should be loaded.
    746747            //
    747             toLoad.sort((o1, o2) -> {
    748                     if (o1.stage < o2.stage) return -1;
    749                     if (o1.stage == o2.stage) return 0;
    750                     return 1;
    751                 }
    752             );
     748            toLoad.sort(Comparator.comparingInt(o -> o.stage));
    753749            if (toLoad.isEmpty())
    754750                return;
Note: See TracChangeset for help on using the changeset viewer.