Skip to content

Commit 445f25c

Browse files
committed
Use HttpMethod::valueOf in HttpMethod::resolve
This commit makes sure that HttpMethod::resolve uses HttpMethod::valueOf and returns an HttpMethod for non-standard methods. See gh-27697
1 parent 9c1a0d3 commit 445f25c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/HttpMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static HttpMethod valueOf(String method) {
146146
@Nullable
147147
@Deprecated
148148
public static HttpMethod resolve(@Nullable String method) {
149-
return (method != null ? mappings.get(method) : null);
149+
return (method != null ? valueOf(method) : null);
150150
}
151151

152152

0 commit comments

Comments
 (0)