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 90b31a0f12b..5c76e968165 100644
--- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
+++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java
@@ -478,14 +478,14 @@ public class AntPathMatcher implements PathMatcher {
/**
* Given a pattern and a full path, determine the pattern-mapped part.
For example:
- * - '{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} → ''
- * - '{@code /docs/*}' and '{@code /docs/cvs/commit} → '{@code cvs/commit}'
- * - '{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} → '{@code commit.html}'
- * - '{@code /docs/**}' and '{@code /docs/cvs/commit} → '{@code cvs/commit}'
- * - '{@code /docs/**\/*.html}' and '{@code /docs/cvs/commit.html} → '{@code cvs/commit.html}'
- * - '{@code /*.html}' and '{@code /docs/cvs/commit.html} → '{@code docs/cvs/commit.html}'
- * - '{@code *.html}' and '{@code /docs/cvs/commit.html} → '{@code /docs/cvs/commit.html}'
- * - '{@code *}' and '{@code /docs/cvs/commit.html} → '{@code /docs/cvs/commit.html}'
+ * '{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html}' → ''
+ * '{@code /docs/*}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'
+ * '{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html}' → '{@code commit.html}'
+ * '{@code /docs/**}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'
+ * '{@code /docs/**\/*.html}' and '{@code /docs/cvs/commit.html}' → '{@code cvs/commit.html}'
+ * '{@code /*.html}' and '{@code /docs/cvs/commit.html}' → '{@code docs/cvs/commit.html}'
+ * '{@code *.html}' and '{@code /docs/cvs/commit.html}' → '{@code /docs/cvs/commit.html}'
+ * '{@code *}' and '{@code /docs/cvs/commit.html}' → '{@code /docs/cvs/commit.html}'
* Assumes that {@link #match} returns {@code true} for '{@code pattern}' and '{@code path}', but
* does not enforce this.
*/
diff --git a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
index ddd8ce9fc8a..59230349620 100644
--- a/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
+++ b/spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
@@ -272,10 +272,10 @@ public class PathPattern implements Comparable {
/**
* Determine the pattern-mapped part for the given path.
* For example:
- * - '{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html} → ''
+ * - '{@code /docs/cvs/commit.html}' and '{@code /docs/cvs/commit.html}' → ''
* - '{@code /docs/*}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'
- * - '{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html} → '{@code commit.html}'
- * - '{@code /docs/**}' and '{@code /docs/cvs/commit} → '{@code cvs/commit}'
+ * - '{@code /docs/cvs/*.html}' and '{@code /docs/cvs/commit.html}' → '{@code commit.html}'
+ * - '{@code /docs/**}' and '{@code /docs/cvs/commit}' → '{@code cvs/commit}'
*
* Notes:
*