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

* pr/10959:
  Use Integer::compare in AutoConfigurationSorter
This commit is contained in:
Stephane Nicoll 2017-11-09 09:51:03 +01:00
commit ad94181914
1 changed files with 1 additions and 1 deletions

View File

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