Fix byte[] nullability annotations in PersonaStateCallback #1067
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After recent code edit in my project I started making use of
AvatarHash
field inPersonaStateCallback
. Despite current nullability which states thatAvatarHash
is non-null, my program has failed numerous times with exception similar to below:I've confirmed my theory that
AvatarHash
is null by ensuring that thisif
executes despite my IDE warning that it's always false:I'm not sure under what exact circumstance this happens, and if it's warranted/intentional, but as it stands today the nullability is simply wrong and I'm only correcting it to what it should be to begin with. I've noticed that
AvatarHash
inClanStateCallback
below is correctly declared asbyte[]?
, therefore this could be simply annotation mistake, as the logic looks similar.As a side note I've corrected
GameDataBlob
as it uses the same proto declaration and is likely also wrong.Thank you in advance for accepting this PR.
/cc @yaakov-h @xPaw