From 7206a23d33132a0c0fa1ef6ad00cbf980165f4d9 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 16 Nov 2020 17:40:39 +0100 Subject: [PATCH] Consistent attribute value spelling for PATH_ATTRIBUTE See gh-24945 --- .../org/springframework/web/util/ServletRequestPathUtils.java | 2 +- .../main/java/org/springframework/web/util/UrlPathHelper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java b/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java index 31722320aa..200478ea55 100644 --- a/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java @@ -39,7 +39,7 @@ import org.springframework.util.Assert; public abstract class ServletRequestPathUtils { /** Name of Servlet request attribute that holds the parsed {@link RequestPath}. */ - public static final String PATH_ATTRIBUTE = ServletRequestPathUtils.class.getName() + ".path"; + public static final String PATH_ATTRIBUTE = ServletRequestPathUtils.class.getName() + ".PATH"; /** diff --git a/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java b/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java index 2fd21b1875..8c23248ddf 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java +++ b/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java @@ -58,9 +58,9 @@ public class UrlPathHelper { * {@link #getLookupPathForRequest resolved} lookupPath. * @since 5.3 */ - public static final String PATH_ATTRIBUTE = UrlPathHelper.class.getName() + ".path"; + public static final String PATH_ATTRIBUTE = UrlPathHelper.class.getName() + ".PATH"; - private static boolean isServlet4Present = + private static final boolean isServlet4Present = ClassUtils.isPresent("javax.servlet.http.HttpServletMapping", UrlPathHelper.class.getClassLoader());