mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mesos] kaysoky commented on a change in pull request #326: MESOS-6874: Validate the match between Type and *Infos in the ContainerInfo.
Date Mon, 18 Mar 2019 18:40:52 GMT
kaysoky commented on a change in pull request #326: MESOS-6874: Validate the match between
Type and *Infos in the ContainerInfo.
URL: https://github.com/apache/mesos/pull/326#discussion_r266577009
 
 

 ##########
 File path: src/common/protobuf_utils.cpp
 ##########
 @@ -77,6 +77,56 @@ namespace mesos {
 namespace internal {
 namespace protobuf {
 
+
+UnionValidator::UnionValidator(
+  const google::protobuf::Descriptor* descriptor,
+  const google::protobuf::EnumDescriptor* typeDescriptor)
+{
+  typeDescriptor_ = typeDescriptor;
+  const auto* unknownTypeValueDescriptor = typeDescriptor->FindValueByNumber(0);
 
 Review comment:
   Consider leaving a newline after `typeDescriptor_ = typeDescriptor;` and inserting a short
comment after this section, i.e.:
   ```
   // If present, the the `0` value of the `Type` enum must be named "UNKNOWN".
   const auto* unknownTypeValueDescriptor = typeDescriptor->FindValueByNumber(0);
   ...
   ```

----------------------------------------------------------------
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