Skip to content

Commit

Permalink
Add more public modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
STAR-ZERO authored and deannagarcia committed Nov 28, 2022
1 parent 6edfc80 commit 7845696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/java/message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/compiler/java/message_lite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 7845696

Please sign in to comment.