When you define a protobuf with enums such as "HOME", "WORK", and "MOBILE", protobuf represents these as :home, :work, and :mobile. However, a null pointer exception occurs if you try to use the keywords when creating a new message; if the protobuf was defined with a string in all caps, that's what needs to be used when creating a message, regardless of representation.
The ambiguity arising from this is not good -- it should be one or the other (i.e., don't convert, or allow keywords to be used when creating a message).
When you define a protobuf with enums such as
"HOME"
,"WORK"
, and"MOBILE"
, protobuf represents these as:home
,:work
, and:mobile
. However, a null pointer exception occurs if you try to use the keywords when creating a new message; if the protobuf was defined with a string in all caps, that's what needs to be used when creating a message, regardless of representation.The ambiguity arising from this is not good -- it should be one or the other (i.e., don't convert, or allow keywords to be used when creating a message).