Merge pull request #15033 from Nooheat

* pr/15033:
  Simplify ArrayList calling addAll() immediately
pull/16246/head
Stephane Nicoll 6 years ago
commit 9c09af0b74

@ -1304,8 +1304,7 @@ public class SpringApplication {
}
private static <E> Set<E> asUnmodifiableOrderedSet(Collection<E> elements) {
List<E> list = new ArrayList<>();
list.addAll(elements);
List<E> list = new ArrayList<>(elements);
list.sort(AnnotationAwareOrderComparator.INSTANCE);
return new LinkedHashSet<>(list);
}

Loading…
Cancel
Save