Automated rollback of commit 3e188b7c04.

PiperOrigin-RevId: 542744002
pull/13064/head
Mike Kruskal 1 year ago committed by Copybara-Service
parent a11f6b6d2a
commit a1b3ff0ddb
  1. 6
      src/google/protobuf/compiler/java/helpers.h
  2. 6
      src/google/protobuf/compiler/java/message_field.cc

@ -358,11 +358,7 @@ bool HasRequiredFields(const Descriptor* descriptor);
bool IsRealOneof(const FieldDescriptor* descriptor); bool IsRealOneof(const FieldDescriptor* descriptor);
inline bool HasHasbit(const FieldDescriptor* descriptor) { inline bool HasHasbit(const FieldDescriptor* descriptor) {
// TODO(b/241441075) Replace this with internal::cpp::HasHasbit once Elysium return internal::cpp::HasHasbit(descriptor);
// unblocks this change.
return (FieldDescriptorLegacy(descriptor).has_optional_keyword() ||
descriptor->is_required()) &&
!descriptor->options().weak();
} }
// Whether generate classes expose public PARSER instances. // Whether generate classes expose public PARSER instances.

@ -326,8 +326,10 @@ void ImmutableMessageFieldGenerator::GenerateBuilderMembers(
"$name$Builder_.mergeFrom(value);\n", "$name$Builder_.mergeFrom(value);\n",
"$set_has_field_bit_builder$\n" "if ($name$_ != null) {\n"
"$on_changed$\n" " $set_has_field_bit_builder$\n"
" $on_changed$\n"
"}\n"
"return this;\n", "return this;\n",
Semantic::kSet); Semantic::kSet);

Loading…
Cancel
Save