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

Correct the ordering of whenSent in doc snippet #8884

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Jun 13, 2024

Description

Resolves #8875

The doc snippet incorrectly registers the whenSent action after sending the response. This (probably) would work in 3.x with the reactive non-blocking style but in 4.x, virtual threads, and blocking it no longer works when done this way.

This PR changes the snippet so it invokes whenSent before sending the response.

I looked for and did not find other incorrect uses of whenSent in other snippets or in examples.

Documentation

This is a doc bug.

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
@tjquinno tjquinno requested a review from romain-grecourt June 13, 2024 19:31
@tjquinno tjquinno self-assigned this Jun 13, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 13, 2024
@tjquinno tjquinno merged commit 1ded39a into helidon-io:main Jun 14, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response.whenSent() only works when called before Response.send()
2 participants