Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Clarify semantics of HttpMethod.valueOf()#36652

Merged
sbrannen merged 1 commit into
spring-projects:7.0.xspring-projects/spring-framework:7.0.xfrom
angry-2k:gh-36642-httpmethod-valueof-docangry-2k/spring-framework:gh-36642-httpmethod-valueof-docCopy head branch name to clipboard
Apr 14, 2026
Merged

Clarify semantics of HttpMethod.valueOf()#36652
sbrannen merged 1 commit into
spring-projects:7.0.xspring-projects/spring-framework:7.0.xfrom
angry-2k:gh-36642-httpmethod-valueof-docangry-2k/spring-framework:gh-36642-httpmethod-valueof-docCopy head branch name to clipboard

Conversation

@angry-2k
Copy link
Copy Markdown
Contributor

This pull request updates the Javadoc for HttpMethod.valueOf() to explicitly document that it performs a case-sensitive lookup.

As requested by @sbrannen in gh-36642, this change is being submitted against the 7.0.x branch to document the status quo.

Motivation

The current behavior of HttpMethod.valueOf() can be ambiguous. This update ensures that developers understand:

  • Standard uppercase inputs (e.g., "GET") resolve to predefined constants.
  • Lowercase or custom inputs (e.g., "get") result in a newly created HttpMethod instance.

Modifications

  • Updated the valueOf(String) Javadoc in HttpMethod.java with clear examples of case-sensitive resolution.

Closes gh-36642

HttpMethod.valueOf() performs a case-sensitive lookup of predefined
HttpMethod constants. For example, valueOf("GET") resolves to
HttpMethod.GET, whereas valueOf("get") results in a newly created
HttpMethod instance.
Update the Javadoc to explicitly document this behavior.

Closes spring-projectsgh-36642

Signed-off-by: angry-2k <edkev@kakao.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 14, 2026
@sbrannen sbrannen self-assigned this Apr 14, 2026
@sbrannen sbrannen added type: documentation A documentation task in: web Issues in web modules (web, webmvc, webflux, websocket) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 14, 2026
@sbrannen sbrannen added this to the 7.0.7 milestone Apr 14, 2026
@sbrannen sbrannen merged commit df82845 into spring-projects:7.0.x Apr 14, 2026
1 check passed
sbrannen added a commit that referenced this pull request Apr 14, 2026
sbrannen pushed a commit that referenced this pull request Apr 14, 2026
HttpMethod.valueOf() performs a case-sensitive lookup of predefined
HttpMethod constants. For example, valueOf("GET") resolves to
HttpMethod.GET, whereas valueOf("get") results in a newly created
HttpMethod instance.
Update the Javadoc to explicitly document this behavior.

See gh-36642
Closes gh-36652

Signed-off-by: angry-2k <edkev@kakao.com>

(cherry picked from commit df82845)
sbrannen added a commit that referenced this pull request Apr 14, 2026
@github-actions github-actions Bot added the status: backported An issue that has been backported to maintenance branches label Apr 14, 2026
@sbrannen
Copy link
Copy Markdown
Member

This has been merged into 7.0.x, slightly revised in cb32046, and backported to 6.2.x in f182f9a.

Thanks

sbrannen added a commit that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.