mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mesos] cf-natali commented on a change in pull request #356: libprocess: check protobuf (de)serialisation success.
Date Tue, 07 Apr 2020 22:00:28 GMT
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

Mime
View raw message