From bd11198f694a2cb1544992bb7868198b1e9dfe6c Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Tue, 11 Aug 2015 15:07:12 -0700 Subject: Fix map fields parsing. Change-Id: If61e16cea84492474a71bbfe985131ec980b0b0a --- src/google/protobuf/util/internal/protostream_objectwriter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/util/internal/protostream_objectwriter.cc') diff --git a/src/google/protobuf/util/internal/protostream_objectwriter.cc b/src/google/protobuf/util/internal/protostream_objectwriter.cc index f9ddbf32..7f6f3c35 100644 --- a/src/google/protobuf/util/internal/protostream_objectwriter.cc +++ b/src/google/protobuf/util/internal/protostream_objectwriter.cc @@ -1541,8 +1541,10 @@ bool ProtoStreamObjectWriter::IsMap(const google::protobuf::Field& field) { const google::protobuf::Type* field_type = typeinfo_->GetType(field.type_url()); + // TODO(xiaofeng): Unify option names. return GetBoolOptionOrDefault(field_type->options(), - "google.protobuf.MessageOptions.map_entry", false); + "google.protobuf.MessageOptions.map_entry", false) || + GetBoolOptionOrDefault(field_type->options(), "map_entry", false); } void ProtoStreamObjectWriter::WriteTag(const google::protobuf::Field& field) { -- cgit v1.2.3