Skip to content

Any type throwing NPE within HttpJson server streaming calls. #3652

@baeminbo

Description

@baeminbo

The HttpJson server streaming callable causes a NullPointerException (NPE) when processing responses containing Any type values. This is because the TypeRegistry in CallOptions is typically null, which is passed to ProtoMessageResponseParser.parse() within HttpJsonClientCallImpl, resulting in NPE.

For example, Spanner's BatchWriteResponse includes a Status field with an Any type details value. Consequently, when the server returns an error, the response parsing results in NPE.

Please take a look at a concrete example in googleapis/java-spanner#3640 for detailed reproduction steps.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions