Skip to content

Commit d5d6d4c

Browse files
karenwuzcopybara-github
authored andcommitted
Stripping empty options
PiperOrigin-RevId: 866110173
1 parent bf8e673 commit d5d6d4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/google/protobuf/descriptor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6687,7 +6687,8 @@ FileDescriptor* DescriptorBuilder::BuildFileImpl(
66876687
GetFile(descriptor), {descriptor.proto_features_, &desc_proto,
66886688
GetFullName(descriptor), proto.name()});
66896689
}
6690-
if (!IsDefaultInstance(*descriptor.options_)) {
6690+
if (!IsDefaultInstance(*descriptor.options_) &&
6691+
descriptor.options_->ByteSizeLong() != 0) {
66916692
deferred_validation_.ValidateFeatureLifetimes(
66926693
GetFile(descriptor), {descriptor.options_, &desc_proto,
66936694
GetFullName(descriptor), proto.name()});

0 commit comments

Comments
 (0)