Original issue created by schwardo@google.com on 2014-03-07 at 02:52 PM
Enumerations specified in Protocol Buffers (https://code.google.com/p/protobuf/) are translated to subclasses of java.lang.Enum. However, the numeric value specified in the protocol value does not map to the numeric value of the Java enumeration. Instead, a getNumber() method is provided on the ProtocolMessageEnum interface, which provides access to the numeric value as specified in the .proto definition.
Any use of ordinal() on a class that implements ProtocolMessageEnum is probably a bug, and may lead to incorrect behavior.
Original issue created by schwardo@google.com on 2014-03-07 at 02:52 PM
Enumerations specified in Protocol Buffers (https://code.google.com/p/protobuf/) are translated to subclasses of java.lang.Enum. However, the numeric value specified in the protocol value does not map to the numeric value of the Java enumeration. Instead, a getNumber() method is provided on the ProtocolMessageEnum interface, which provides access to the numeric value as specified in the .proto definition.
Any use of ordinal() on a class that implements ProtocolMessageEnum is probably a bug, and may lead to incorrect behavior.