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 NPE for gRPC empty stream #973

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

EveryAndrey
Copy link

@EveryAndrey EveryAndrey commented Oct 19, 2023

Context

When for gRPC stream Response wasn't called onNext() before onComplete() (that is a valid case) then we got NPE at row
'requireNonNull(responseAttachmentBuilder).setStatus(status.toString());' because it expects only single or multiple response values.

Checklist

@baev baev added the type:bug Something isn't working label Oct 26, 2023
@dtuchs
Copy link

dtuchs commented Mar 2, 2024

@baev @EveryAndrey it is fixed in #1015
Methods private <T, A> GrpcRequestAttachment.Builder requestAttachment(final MethodDescriptor<T, A> method)
and
private <T, A> GrpcResponseAttachment.Builder responseAttachment(final MethodDescriptor<T, A> method, final io.grpc.Status status, final Metadata metadata)
just return empty array attachement ( []) for epmty streams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants