Skip to content

Commit 88f73bf

Browse files
committed
Make assertion message lazy in ServletRequestPathUtils
Closes gh-27946
1 parent 0ab054c commit 88f73bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -74,7 +74,7 @@ public static RequestPath parseAndCache(HttpServletRequest request) {
7474
*/
7575
public static RequestPath getParsedRequestPath(ServletRequest request) {
7676
RequestPath path = (RequestPath) request.getAttribute(PATH_ATTRIBUTE);
77-
Assert.notNull(path, "Expected parsed RequestPath in request attribute \"" + PATH_ATTRIBUTE + "\".");
77+
Assert.notNull(path, () -> "Expected parsed RequestPath in request attribute \"" + PATH_ATTRIBUTE + "\".");
7878
return path;
7979
}
8080

0 commit comments

Comments
 (0)