Skip to content

Conversation

JasonYuan869
Copy link
Contributor

@JasonYuan869 JasonYuan869 commented Feb 15, 2023

Closes #26700.

Removes the redundant & from the json.Unmarshal call in CallContext. This function already checks that result is either nil or a pointer type, so the extra reference operator is unnecessary. This actually causes a bug where nulls are not unmarshalled correctly into json.RawMessage (see original ticket for details).

Added a test case to check that nulls are properly unmarshalled.

Feedback and comments are welcome and appreciated!

@JasonYuan869 JasonYuan869 marked this pull request as ready for review February 16, 2023 01:58
@fjl
Copy link
Contributor

fjl commented Feb 17, 2023

Re-submitted in #26723 to add a commit.

@fjl fjl closed this Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc.Client.CallContext incorrectly unmarshalling null results

2 participants