Add "NO CHECKED-IN PROTOBUF GENCODE" to Protobuf Java gencode.

PiperOrigin-RevId: 616131629
pull/16089/head
Protobuf Team Bot 9 months ago committed by Copybara-Service
parent 0a6a117ed3
commit 67816a54a9
  1. 12
      src/google/protobuf/compiler/java/file.cc
  2. 3
      src/google/protobuf/compiler/java/shared_code_generator.cc

@ -243,6 +243,9 @@ void FileGenerator::Generate(io::Printer* printer) {
// fully-qualified names in the generated source.
printer->Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// NO CHECKED-IN PROTOBUF "
// Intentional line breaker
"GENCODE\n"
"// source: $filename$\n",
"filename", file_->name());
if (options_.opensource_runtime) {
@ -520,6 +523,9 @@ static void GenerateSibling(
printer.Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// NO CHECKED-IN PROTOBUF "
// Intentional line breaker
"GENCODE\n"
"// source: $filename$\n",
"filename", descriptor->file()->name());
if (opensource_runtime) {
@ -600,6 +606,9 @@ std::string FileGenerator::GetKotlinClassname() {
void FileGenerator::GenerateKotlin(io::Printer* printer) {
printer->Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// NO CHECKED-IN PROTOBUF "
// Intentional line breaker
"GENCODE\n"
"// source: $filename$\n"
"\n",
"filename", file_->name());
@ -638,6 +647,9 @@ void FileGenerator::GenerateKotlinSiblings(
printer.Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// NO CHECKED-IN PROTOBUF "
// Intentional line breaker
"GENCODE\n"
"// source: $filename$\n"
"\n",
"filename", descriptor->file()->name());

@ -59,6 +59,9 @@ void SharedCodeGenerator::Generate(
std::string info_full_path = absl::StrCat(filename, ".pb.meta");
printer->Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// NO CHECKED-IN PROTOBUF "
// Intentional line breaker
"GENCODE\n"
"// source: $filename$\n",
"filename", file_->name());
if (options_.opensource_runtime) {

Loading…
Cancel
Save