Add more public modifiers

pull/11068/head
Kenji Abe 2 years ago committed by Deanna Garcia
parent 6edfc80428
commit 7845696b1a
  1. 2
      src/google/protobuf/compiler/java/message.cc
  2. 2
      src/google/protobuf/compiler/java/message_lite.cc

@ -1357,7 +1357,7 @@ void ImmutableMessageGenerator::GenerateKotlinOrNull(io::Printer* printer) const
const FieldDescriptor* field = descriptor_->field(i);
if (field->has_presence() && GetJavaType(field) == JAVATYPE_MESSAGE) {
printer->Print(
"val $full_classname$OrBuilder.$camelcase_name$OrNull: $full_name$?\n"
"public val $full_classname$OrBuilder.$camelcase_name$OrNull: $full_name$?\n"
" get() = if (has$name$()) get$name$() else null\n\n",
"full_classname", name_resolver_->GetClassName(descriptor_, true),
"camelcase_name", context_->GetFieldGeneratorInfo(field)->name,

@ -830,7 +830,7 @@ void ImmutableMessageLiteGenerator::GenerateKotlinOrNull(io::Printer* printer) c
const FieldDescriptor* field = descriptor_->field(i);
if (field->has_presence() && GetJavaType(field) == JAVATYPE_MESSAGE) {
printer->Print(
"val $full_classname$OrBuilder.$camelcase_name$OrNull: "
"public val $full_classname$OrBuilder.$camelcase_name$OrNull: "
"$full_name$?\n"
" get() = if (has$name$()) get$name$() else null\n\n",
"full_classname", name_resolver_->GetClassName(descriptor_, true),

Loading…
Cancel
Save