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

protobuf-JSON rendering doesnt validate

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reviewable
    • Minor
    • Resolution: Unresolved
    • 0.19.0
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Akanksha08 Akanksha Agrawal
            tillt Till Toenshoff

            Dates

              Created:
              Updated:

              Slack

                Issue deployment