Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1194

protobuf-JSON rendering doesnt validate

    Details

    • Type: Bug
    • Status: Reviewable
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.19.0
    • Fix Version/s: None
    • Component/s: stout

      Description

      When using JSON::Protobuf(Message&), the supplied protobuf is not checked for being properly initialized, hence e.g. required fields could be missing.

      It would be desirable to have a feedback mechanism in place for this constructor - maybe this would do:

      if (!message.IsInitialized()) { 
        std::cerr << "Protobuf not initialized: " << message.InitializationErrorString() << std::endl;
        abort();
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Akanksha08 Akanksha Agrawal
              Reporter:
              tillt Till Toenshoff
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: