Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ServletUriComponentsBuilder examples in ref docs #27984

Closed
wants to merge 1 commit into from
Closed

Fix ServletUriComponentsBuilder examples in ref docs #27984

wants to merge 1 commit into from

Conversation

wkwkhautbois
Copy link
Contributor

Fix ServletUriComponentsBuilder examples in reference docs.

Fixed two problems.

  • Type mismatch
  • Comments are inaccurate

before

// Re-uses host, port and context path...

ServletUriComponentsBuilder ucb = ServletUriComponentsBuilder.fromContextPath(request)
        .path("/accounts").build()

after

// Re-uses host, port, scheme and context path...

URI uri = ServletUriComponentsBuilder.fromContextPath(request)
        .path("/accounts")
        .build()
        .toUri();

@pivotal-cla
Copy link

@wkwkhautbois Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@wkwkhautbois Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 28, 2022
@sbrannen sbrannen added the type: documentation A documentation task label Jan 28, 2022
@sbrannen sbrannen changed the title Fix examples of ServletUriComponentsBuilder. Fix ServletUriComponentsBuilder examples in ref docs Jan 28, 2022
@sbrannen sbrannen self-assigned this Jan 28, 2022
@sbrannen sbrannen added 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 Jan 28, 2022
@sbrannen sbrannen added this to the 5.3.16 milestone Jan 28, 2022
sbrannen added a commit to sbrannen/spring-framework that referenced this pull request Jan 28, 2022
@sbrannen sbrannen closed this in fadfcf4 Jan 28, 2022
@sbrannen
Copy link
Member

Good catch!

This has been merged into 5.3.x and main.

Thanks for making your first contribution to the Spring Framework. 👍

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) type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants