From 928855e47affff6097d3c824d79e8dbe31cf3594 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 8 Jul 2009 10:15:58 +0000 Subject: [PATCH] Javadoc --- .../main/java/org/springframework/util/AntPathMatcher.java | 3 +++ .../src/main/java/org/springframework/util/PathMatcher.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/org.springframework.core/src/main/java/org/springframework/util/AntPathMatcher.java b/org.springframework.core/src/main/java/org/springframework/util/AntPathMatcher.java index 4dbb91da68d..ec12187a41f 100644 --- a/org.springframework.core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/org.springframework.core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -357,6 +357,9 @@ public class AntPathMatcher implements PathMatcher { *
  • /hotels/{hotel}
  • /hotels/*
  • 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 * @return a comparator capable of sorting patterns in order of explicitness */ diff --git a/org.springframework.core/src/main/java/org/springframework/util/PathMatcher.java b/org.springframework.core/src/main/java/org/springframework/util/PathMatcher.java index 244aa884f1a..a51a3b466d5 100644 --- a/org.springframework.core/src/main/java/org/springframework/util/PathMatcher.java +++ b/org.springframework.core/src/main/java/org/springframework/util/PathMatcher.java @@ -104,10 +104,10 @@ public interface PathMatcher { Map extractUriTemplateVariables(String pattern, String path); /** - * Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of explicitness. + * Given a full path, returns a {@link Comparator} suitable for sorting patterns in order of explicitness for that path. *

    The full algorithm used depends on the underlying implementation, but generally, the returned * Comparator will {@linkplain java.util.Collections#sort(java.util.List, java.util.Comparator) sort} a - * list so that more specific patterns come before generic patterns. + * list so that more specific patterns (for that come before generic patterns. * * @param path the full path to use for comparison * @return a comparator capable of sorting patterns in order of explicitness