diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java index 0e5b1a91ae..e8f8372e03 100644 --- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -614,14 +614,15 @@ public class AntPathMatcher implements PathMatcher { /** * Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of * explicitness. - *
This{@code Comparator} will {@linkplain java.util.List#sort(Comparator) sort} - * a list so that more specific patterns (without uri templates or wild cards) come before - * generic patterns. So given a list with the following patterns: + *
This {@code Comparator} will {@linkplain java.util.List#sort(Comparator) sort} + * a list so that more specific patterns (without URI templates or wild cards) come before + * generic patterns. So given a list with the following patterns, the returned comparator + * will sort this list so that the order will be as indicated. *
The full path given as parameter is used to test for exact matches. So when the given path * is {@code /hotels/2}, the pattern {@code /hotels/2} will be sorted before {@code /hotels/1}. * @param path the full path to use for comparison