Skip to content

Allow null contextPath in ServerHttpRequest.Builder - #37099

Open
garvit-joshi wants to merge 1 commit into
spring-projects:mainfrom
garvit-joshi:fix/gh-37098-nullable-builder-contextpath
Open

Allow null contextPath in ServerHttpRequest.Builder#37099
garvit-joshi wants to merge 1 commit into
spring-projects:mainfrom
garvit-joshi:fix/gh-37098-nullable-builder-contextpath

Conversation

@garvit-joshi

@garvit-joshi garvit-joshi commented Jul 31, 2026

Copy link
Copy Markdown

closes #37098

The builder method required a non-null contextPath while the underlying
field, MutatedServerHttpRequest constructor, and RequestPath.parse all
accept null and treat it the same as an empty string. Relax the method
parameter to @nullable so callers can clear the context path directly.

closes spring-projects#37098

Signed-off-by: Garvit Joshi <garvitjoshi9@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServerHttpRequest.Builder.contextPath() does not accept null but the implementation is nullable

2 participants