Skip to content

Commit

Permalink
Internal Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 532148865
  • Loading branch information
mkruskal-google authored and Copybara-Service committed May 15, 2023
1 parent 191f4be commit fc7454a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/google/protobuf/compiler/retention.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/google/protobuf/retention_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fc7454a

Please sign in to comment.