Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-2959

Fix proto enums to not use 0 for a valid value

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.2.0
    • beam-model
    • None

    Description

      Proto3 uses 0 as the default value for enums and does not encode it on the wire which means that you can not detect the difference between a value that is unset and an enum that is set but has a value of zero.

      Defining an "YYY_UNSPECIFIED" is considered a best practice. Unfortunately this is not done automatically because of proto2 compatibility within proto3.

      Attachments

        Activity

          People

            lcwik Luke Cwik
            lcwik Luke Cwik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: