Skip to content

Commit

Permalink
Automated rollback of commit 3e188b7.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 542744002
  • Loading branch information
mkruskal-google authored and copybara-github committed Jun 23, 2023
1 parent a11f6b6 commit a1b3ff0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/google/protobuf/compiler/java/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,7 @@ bool HasRequiredFields(const Descriptor* descriptor);
bool IsRealOneof(const FieldDescriptor* descriptor);

inline bool HasHasbit(const FieldDescriptor* descriptor) {
// TODO(b/241441075) Replace this with internal::cpp::HasHasbit once Elysium
// unblocks this change.
return (FieldDescriptorLegacy(descriptor).has_optional_keyword() ||
descriptor->is_required()) &&
!descriptor->options().weak();
return internal::cpp::HasHasbit(descriptor);
}

// Whether generate classes expose public PARSER instances.
Expand Down
6 changes: 4 additions & 2 deletions src/google/protobuf/compiler/java/message_field.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,10 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers(

"$name$Builder_.mergeFrom(value);\n",

"$set_has_field_bit_builder$\n"
"$on_changed$\n"
"if ($name$_ != null) {\n"
" $set_has_field_bit_builder$\n"
" $on_changed$\n"
"}\n"
"return this;\n",
Semantic::kSet);

Expand Down

0 comments on commit a1b3ff0

Please sign in to comment.