Overview
As discussed in #36518, HttpMethod.valueOf() currently performs a case-sensitive lookup of predefined HttpMethod constants. The reason is that it was originally an enum and therefore aligned with the semantics of Enum#valueOf.
However, the Javadoc for HttpMethod.valueOf() currently only states that it returns "an HttpMethod object for the given value."
We should therefore document the status quo to make it clear to users that HttpMethod.valueOf("GET") resolves to HttpMethod.GET while HttpMethod.valueOf("get") resolves to new HttpMethod("get").
Related Issues
Overview
As discussed in #36518,
HttpMethod.valueOf()currently performs a case-sensitive lookup of predefinedHttpMethodconstants. The reason is that it was originally an enum and therefore aligned with the semantics ofEnum#valueOf.However, the Javadoc for
HttpMethod.valueOf()currently only states that it returns "anHttpMethodobject for the given value."We should therefore document the status quo to make it clear to users that
HttpMethod.valueOf("GET")resolves toHttpMethod.GETwhileHttpMethod.valueOf("get")resolves tonew HttpMethod("get").Related Issues
HttpMethod.valueOf()#36518