Internal Code Change

PiperOrigin-RevId: 532148865
pull/12800/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 191f4be064
commit fc7454acf8
  1. 3
      src/google/protobuf/compiler/retention.cc
  2. 3
      src/google/protobuf/retention_test.cc

@ -299,8 +299,7 @@ MessageOptions StripLocalSourceRetentionOptions(const Descriptor& descriptor) {
ExtensionRangeOptions StripLocalSourceRetentionOptions(
const Descriptor& descriptor, const Descriptor::ExtensionRange& range) {
if (range.options_ == nullptr) return ExtensionRangeOptions{};
ExtensionRangeOptions options = *range.options_;
ExtensionRangeOptions options = range.options();
ConvertToDynamicMessageAndStripOptions(options, GetPool(descriptor));
return options;
}

@ -160,7 +160,8 @@ TEST(RetentionTest, ExtensionRange) {
CheckOptionsMessageIsStrippedCorrectly(
protobuf_unittest::TopLevelMessage::descriptor()
->extension_range(0)
->options_->GetExtension(protobuf_unittest::extension_range_option));
->options()
.GetExtension(protobuf_unittest::extension_range_option));
}
TEST(RetentionTest, Service) {

Loading…
Cancel
Save