Skip to content

Avoid opaque to hierarchical reset in UriComponentsBuilder when input is null #24444

@kganesh

Description

@kganesh

Affects: 4.2.x

Execute below test case and verify the result:

public void testURIComponentBuilder(){
        String uri = "urn:ietf:wg:oauth:2.0:oob";
	UriComponentsBuilder redirectUriBuilder =  UriComponentsBuilder.fromUriString(uri);
	redirectUriBuilder.replaceQuery(null);
	redirectUriBuilder.fragment(null);
	redirectUriBuilder.build().toUriString();
	assertThat(redirectUriBuilder.toUriString()).isEqualTo(uri);
}

Expected result: urn:ietf:wg:oauth:2.0:oob

Actual result: urn:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

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