Fix Java 1.6 compile

pull/3770/head
Jisi Liu 7 years ago
parent 188755c065
commit 2ee294d80b
  1. 4
      src/google/protobuf/compiler/java/java_message_lite.cc

@ -730,10 +730,10 @@ void ImmutableMessageLiteGenerator::GenerateSerializeOneExtensionRange(
void ImmutableMessageLiteGenerator::GenerateBuilder(io::Printer* printer) {
printer->Print(
"public static Builder newBuilder() {\n"
" return DEFAULT_INSTANCE.createBuilder();\n"
" return (Builder) DEFAULT_INSTANCE.createBuilder();\n"
"}\n"
"public static Builder newBuilder($classname$ prototype) {\n"
" return DEFAULT_INSTANCE.createBuilder(prototype);\n"
" return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);\n"
"}\n"
"\n",
"classname", name_resolver_->GetImmutableClassName(descriptor_));

Loading…
Cancel
Save