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

static method StreamObservers.nextAndComplete() #11778

Merged
merged 5 commits into from
Apr 4, 2025

Conversation

panchenko
Copy link
Contributor

Discussion started in #10957

*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10957")
public static <T> void nextAndComplete(StreamObserver<T> responseObserver, T response) {
Preconditions.checkNotNull(response, "response");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this precondition for not null here, since any such check if needed should really be done in the onNext implementation?

Copy link
Contributor

@kannanjgithub kannanjgithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are fine with the name nextAndComplete.

@kannanjgithub kannanjgithub self-requested a review April 3, 2025 15:12
@kannanjgithub kannanjgithub dismissed their stale review April 3, 2025 15:15

Accidentally self-requested review.

@kannanjgithub kannanjgithub added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 4, 2025
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Apr 4, 2025
@kannanjgithub kannanjgithub merged commit edc2bf7 into grpc:master Apr 4, 2025
16 checks passed
@kannanjgithub kannanjgithub added the TODO:backport PR needs to be backported. Removed after backport complete label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO:backport PR needs to be backported. Removed after backport complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants