You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/01/12 02:21:49 UTC
[4/4] mesos git commit: Fixed stout's protobuf::parse to support JSON
null values.
Fixed stout's protobuf::parse to support JSON null values.
Review: https://reviews.apache.org/r/42166/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d9db0363
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d9db0363
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d9db0363
Branch: refs/heads/master
Commit: d9db0363e16b9f1400f511d95c084f8c8ba264dc
Parents: 4945282
Author: Gilbert Song <so...@gmail.com>
Authored: Mon Jan 11 16:08:21 2016 -0800
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Jan 11 17:21:36 2016 -0800
----------------------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d9db0363/3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp
index 98ea477..adb68c3 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp
@@ -488,7 +488,10 @@ struct Parser : boost::static_visitor<Try<Nothing> >
Try<Nothing> operator()(const JSON::Null&) const
{
- return Error("Not expecting a JSON null");
+ // We treat 'null' as an unset field. Note that we allow
+ // unset required fields here since the top-level parse
+ // function is responsible for checking 'IsInitialized'.
+ return Nothing();
}
private: