From 7845696b1a73c27ac608812392158e1d2e519fe2 Mon Sep 17 00:00:00 2001 From: Kenji Abe Date: Sat, 17 Sep 2022 09:13:50 +0900 Subject: [PATCH] Add more public modifiers --- src/google/protobuf/compiler/java/message.cc | 2 +- src/google/protobuf/compiler/java/message_lite.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/compiler/java/message.cc b/src/google/protobuf/compiler/java/message.cc index 1199a346a5d1..a29d9a78e831 100644 --- a/src/google/protobuf/compiler/java/message.cc +++ b/src/google/protobuf/compiler/java/message.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, diff --git a/src/google/protobuf/compiler/java/message_lite.cc b/src/google/protobuf/compiler/java/message_lite.cc index dfc7d281dfd1..9a85734ab098 100644 --- a/src/google/protobuf/compiler/java/message_lite.cc +++ b/src/google/protobuf/compiler/java/message_lite.cc @@ -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),