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
This commit is contained in:
Arjen Poutsma
2021-11-30 14:59:42 +01:00
parent 9c1a0d32be
commit 445f25c466

View File

@@ -146,7 +146,7 @@ public final class HttpMethod implements Comparable<HttpMethod>, Serializable {
@Nullable
@Deprecated
public static HttpMethod resolve(@Nullable String method) {
return (method != null ? mappings.get(method) : null);
return (method != null ? valueOf(method) : null);
}