Skip to content

Document status quo for semantics HttpMethod.valueOf() #36642

@sbrannen

Description

@sbrannen

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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation task

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions