diff --git a/spring-core/src/main/java/org/springframework/core/OrderComparator.java b/spring-core/src/main/java/org/springframework/core/OrderComparator.java index f38f3923679..11cbbe17c4a 100644 --- a/spring-core/src/main/java/org/springframework/core/OrderComparator.java +++ b/spring-core/src/main/java/org/springframework/core/OrderComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,10 @@ import org.springframework.util.ObjectUtils; * {@link Comparator} implementation for {@link Ordered} objects, sorting * by order value ascending, respectively by priority descending. * + *
{@link PriorityOrdered} objects will be sorted with higher priority than + * plain {@code Ordered} objects. + * *
Objects that have the same order value will be sorted with arbitrary * ordering with respect to other objects with the same order value. @@ -41,6 +45,7 @@ import org.springframework.util.ObjectUtils; * @author Sam Brannen * @since 07.04.2003 * @see Ordered + * @see PriorityOrdered * @see org.springframework.core.annotation.AnnotationAwareOrderComparator * @see java.util.List#sort(java.util.Comparator) * @see java.util.Arrays#sort(Object[], java.util.Comparator)