You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by GitBox <gi...@apache.org> on 2020/04/07 22:00:28 UTC

[GitHub] [mesos] cf-natali commented on a change in pull request #356: libprocess: check protobuf (de)serialisation success.

cf-natali commented on a change in pull request #356: libprocess: check protobuf (de)serialisation success.
URL: https://github.com/apache/mesos/pull/356#discussion_r405139102
 
 

 ##########
 File path: 3rdparty/libprocess/include/process/protobuf.hpp
 ##########
 @@ -329,13 +332,11 @@ class ProtobufProcess : public process::Process<T>
   {
     google::protobuf::Arena arena;
     M* m = CHECK_NOTNULL(google::protobuf::Arena::CreateMessage<M>(&arena));
-    m->ParseFromString(data);
 
-    if (m->IsInitialized()) {
+    if (m->ParseFromString(data)) {
       (t->*method)(*m);
     } else {
-      LOG(WARNING) << "Initialization errors: "
-                   << m->InitializationErrorString();
+      LOG(WARNING) << "Error deserialising: " << data;
 
 Review comment:
   Done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services