Browse Source

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
pull/27755/head
Arjen Poutsma 3 years ago
parent
commit
445f25c466
  1. 2
      spring-web/src/main/java/org/springframework/http/HttpMethod.java

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

@ -146,7 +146,7 @@ public final class HttpMethod implements Comparable<HttpMethod>, Serializable { @@ -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);
}

Loading…
Cancel
Save