> On April 16, 2015, 2:46 p.m., Till Toenshoff wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp, line 573
> > <https://reviews.apache.org/r/32058/diff/3/?file=896261#file896261line573>
> >
> > Just as Vinod commented on the JIRA, we might want to do that
> > differently - e.g. by adding a factory.
>
> Akanksha Agrawal wrote:
> I did not understand how this should be done. Can you elaborate it a bit?
>
> Jay Guo wrote:
> I think this patch is very outdated, could you rebase first? I failed to
> find this class...
And I think a factory method to instantiate protobuf could be something like:
```
Try<Protobuf> createProtobuf(message)
{
if message is valid:
return Protobuf(message);
else:
return Error("...");
end
UNREACHABLE();
}
```
and put Protobuf constructor `Protobuf(message)` in private.
- Jay
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32058/#review80333
-----------------------------------------------------------
On March 16, 2015, 8:02 p.m., Akanksha Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32058/
> -----------------------------------------------------------
>
> (Updated March 16, 2015, 8:02 p.m.)
>
>
> Review request for mesos and Till Toenshoff.
>
>
> Bugs: MESOS-1194
> https://issues.apache.org/jira/browse/MESOS-1194
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added protobuf-JSON validation
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp
> 2c020d98b94995bce862ac3b9c173dd64ed1198d
>
> Diff: https://reviews.apache.org/r/32058/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Akanksha Agrawal
>
>