Skip to content

Conversation

panchenko
Copy link
Contributor

It someone wants it nullable, that should be defined via the type parameter, e.g. StatusOr<@Nullable Foo> foo

@ejona86
Copy link
Member

ejona86 commented Sep 18, 2025

I'm a little bit worried that this is getting into specifics of one Nullable annotation vs another; I know they aren't all equivalent and there were limitations lifted with later annotations. Given that everything is @Nullable, we know this annotation has no behavior right now, which means verifying behavior is out of the question.

@panchenko
Copy link
Contributor Author

I was trying to use this type in our code, with the result of unexpected warnings from IDE

There are plenty of such warnings in this repo as well, e.g.

ClusterResolutionResult result = statusOrResult.getValue();
List<EquivalentAddressGroup> addresses = result.addresses;

getValue() is nullable, so result can be null, and then there is a warning for result.addresses

@ejona86
Copy link
Member

ejona86 commented Sep 18, 2025

All arguments/return types in gRPC should be Nullable from a tool's perspective. We don't have NonNull enabled at the package level. To my current understanding, if these changes here are causing changes in the IDE, then the IDE is broken.

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.

2 participants