Merge pull request #10959 from dreis2211:use-compare-for-sorting-of-primitives

* pr/10959:
  Use Integer::compare in AutoConfigurationSorter
pull/10972/head
Stephane Nicoll 7 years ago
commit ad94181914

@ -61,7 +61,7 @@ class AutoConfigurationSorter {
orderedClassNames.sort((o1, o2) -> {
int i1 = classes.get(o1).getOrder();
int i2 = classes.get(o2).getOrder();
return (i1 < i2) ? -1 : (i1 > i2) ? 1 : 0;
return Integer.compare(i1, i2);
});
// Then respect @AutoConfigureBefore @AutoConfigureAfter
orderedClassNames = sortByAnnotation(classes, orderedClassNames);

Loading…
Cancel
Save