Search code examples
javaprotocol-buffersgrpcgrpc-java

grpc BoolValue false value is equal to default one


I have a field of type BoolValue in backend proto-file, and need to set it to true, false or empty on Android client.
However, i can set it only to true, the attempt to create a false BoolValue leads to just empty object.
Is it normal behaviour for grpc-java implementation, and can i changed it somehow?
Thanks

proof from Android Studio debugger1


Solution

  • That's normal behavior. There no way to know if the optional field was explicitly set or has default value.