Use Integer::compare in AutoConfigurationSorter

Closes gh-10959
This commit is contained in:
dreis2211 2017-11-09 00:16:09 +01:00 committed by Stephane Nicoll
parent 3be521e825
commit 93b1ebb7fa

View File

@ -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);