From 5d0833f48cda0ad7e987388b1d0d4b85f4fa5b43 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 4 Oct 2022 13:33:36 -0700 Subject: [PATCH] Removed obsolete exemption for closed enums The referenced bug was fixed long ago: https://github.com/protocolbuffers/upb/issues/541 PiperOrigin-RevId: 478870590 --- upb/reflection/field_def.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/upb/reflection/field_def.c b/upb/reflection/field_def.c index 08a4e4186b..b1a7c3c2e6 100644 --- a/upb/reflection/field_def.c +++ b/upb/reflection/field_def.c @@ -250,13 +250,6 @@ bool _upb_FieldDef_IsClosedEnum(const upb_FieldDef* f) { if (UPB_TREAT_PROTO2_ENUMS_LIKE_PROTO3) return false; if (f->type_ != kUpb_FieldType_Enum) return false; - // TODO(https://github.com/protocolbuffers/upb/issues/541): - // fix map enum values to check for unknown enum values and put - // them in the unknown field set. - if (upb_MessageDef_IsMapEntry(upb_FieldDef_ContainingType(f))) { - return false; - } - // TODO: Maybe make is_proto2 a bool at creation? const upb_FileDef* file = upb_EnumDef_File(f->sub.enumdef); return upb_FileDef_Syntax(file) == kUpb_Syntax_Proto2;