UrlPathHelper.java (spring-framework-5.3.23) | : | UrlPathHelper.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
skipping to change at line 205 | skipping to change at line 205 | |||
public String resolveAndCacheLookupPath(HttpServletRequest request) { | public String resolveAndCacheLookupPath(HttpServletRequest request) { | |||
String lookupPath = getLookupPathForRequest(request); | String lookupPath = getLookupPathForRequest(request); | |||
request.setAttribute(PATH_ATTRIBUTE, lookupPath); | request.setAttribute(PATH_ATTRIBUTE, lookupPath); | |||
return lookupPath; | return lookupPath; | |||
} | } | |||
/** | /** | |||
* Return a previously {@link #getLookupPathForRequest resolved} lookupPa th. | * Return a previously {@link #getLookupPathForRequest resolved} lookupPa th. | |||
* @param request the current request | * @param request the current request | |||
* @return the previously resolved lookupPath | * @return the previously resolved lookupPath | |||
* @throws IllegalArgumentException if the not found | * @throws IllegalArgumentException if the lookup path is not found | |||
* @since 5.3 | * @since 5.3 | |||
*/ | */ | |||
public static String getResolvedLookupPath(ServletRequest request) { | public static String getResolvedLookupPath(ServletRequest request) { | |||
String lookupPath = (String) request.getAttribute(PATH_ATTRIBUTE) ; | String lookupPath = (String) request.getAttribute(PATH_ATTRIBUTE) ; | |||
Assert.notNull(lookupPath, "Expected lookupPath in request attrib ute \"" + PATH_ATTRIBUTE + "\"."); | Assert.notNull(lookupPath, () -> "Expected lookupPath in request attribute \"" + PATH_ATTRIBUTE + "\"."); | |||
return lookupPath; | return lookupPath; | |||
} | } | |||
/** | /** | |||
* Variant of {@link #getLookupPathForRequest(HttpServletRequest)} that | * Variant of {@link #getLookupPathForRequest(HttpServletRequest)} that | |||
* automates checking for a previously computed lookupPath saved as a | * automates checking for a previously computed lookupPath saved as a | |||
* request attribute. The attribute is only used for lookup purposes. | * request attribute. The attribute is only used for lookup purposes. | |||
* @param request current HTTP request | * @param request current HTTP request | |||
* @param name the request attribute that holds the lookupPath | * @param name the request attribute that holds the lookupPath | |||
* @return the lookup path | * @return the lookup path | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |