Skip to content

Fix NPE for gRPC empty stream#973

Closed
EveryAndrey wants to merge 2 commits into
allure-framework:mainfrom
EveryAndrey:allure-grpc-empty-stream-response
Closed

Fix NPE for gRPC empty stream#973
EveryAndrey wants to merge 2 commits into
allure-framework:mainfrom
EveryAndrey:allure-grpc-empty-stream-response

Conversation

@EveryAndrey

@EveryAndrey EveryAndrey commented Oct 19, 2023

Copy link
Copy Markdown

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

dtuchs commented Mar 2, 2024

Copy link
Copy Markdown

@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.

@baev

baev commented Dec 11, 2025

Copy link
Copy Markdown
Member

already fixed

@baev baev closed this Dec 11, 2025
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.

3 participants