Skip to content

Conversation

@ejona86
Copy link
Member

@ejona86 ejona86 commented Jan 3, 2023

See #9706

@ejona86 ejona86 requested a review from sanjaypujare January 3, 2023 19:19
@sanjaypujare
Copy link
Contributor

How about adding the same checks to

  • AsciiKey.toBytes() line 982
  • TrustedAsciiKey.toBytes() line 1007

Copy link
Contributor

@sanjaypujare sanjaypujare left a comment

Choose a reason for hiding this comment

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

Found 2 places where the check can potentially be added

@ejona86
Copy link
Member Author

ejona86 commented Jan 5, 2023

I had seen both of those places and didn't care. The first will already NPE and the second is fairly safe. It would be good to fix the second to avoid needing to consider the case, and I might as well be consistent with the error message for the first.

@ejona86 ejona86 requested a review from sanjaypujare January 5, 2023 22:25
Copy link
Contributor

@sanjaypujare sanjaypujare left a comment

Choose a reason for hiding this comment

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

LGTM

@ejona86 ejona86 merged commit cc53784 into grpc:master Jan 6, 2023
@ejona86 ejona86 deleted the metadata-earlier-npe branch January 6, 2023 01:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants