diff --git a/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java b/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java
index 5752800b2..55b2d40e7 100644
a
|
b
|
public class RelationSorter {
|
199 | 199 | * @since 17862 (signature change, generics) |
200 | 200 | */ |
201 | 201 | public static <T extends IRelationMember<? extends IPrimitive>> List<T> sortMembersByConnectivity(List<T> defaultMembers) { |
| 202 | // sort incoming relation members in order to ensure that sorting |
| 203 | // multiple times always produces the same order |
| 204 | // (the output order is dependent on the input order) |
| 205 | defaultMembers.sort((o1, o2) -> { |
| 206 | return Integer.compare(o1.hashCode(), o2.hashCode()); |
| 207 | }); |
| 208 | |
202 | 209 | List<T> newMembers; |
203 | 210 | |
204 | 211 | RelationNodeMap<T> map = new RelationNodeMap<>(defaultMembers); |