Merge pull request #3134 from lundefugl/javabug1

Issue 3112: Object class with fully qualified name
pull/3378/merge
Feng Xiao 7 years ago committed by GitHub
commit eb8e3d3220
  1. 6
      src/google/protobuf/compiler/java/java_message_builder.cc
  2. 4
      src/google/protobuf/compiler/java/java_message_lite.cc

@ -472,7 +472,7 @@ GenerateCommonBuilderMethods(io::Printer* printer) {
"}\n"
"public Builder setField(\n"
" com.google.protobuf.Descriptors.FieldDescriptor field,\n"
" Object value) {\n"
" java.lang.Object value) {\n"
" return (Builder) super.setField(field, value);\n"
"}\n"
"public Builder clearField(\n"
@ -485,12 +485,12 @@ GenerateCommonBuilderMethods(io::Printer* printer) {
"}\n"
"public Builder setRepeatedField(\n"
" com.google.protobuf.Descriptors.FieldDescriptor field,\n"
" int index, Object value) {\n"
" int index, java.lang.Object value) {\n"
" return (Builder) super.setRepeatedField(field, index, value);\n"
"}\n"
"public Builder addRepeatedField(\n"
" com.google.protobuf.Descriptors.FieldDescriptor field,\n"
" Object value) {\n"
" java.lang.Object value) {\n"
" return (Builder) super.addRepeatedField(field, value);\n"
"}\n");

@ -346,9 +346,9 @@ void ImmutableMessageLiteGenerator::Generate(io::Printer* printer) {
printer->Print(
"@java.lang.SuppressWarnings({\"unchecked\", \"fallthrough\"})\n"
"protected final Object dynamicMethod(\n"
"protected final java.lang.Object dynamicMethod(\n"
" com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,\n"
" Object arg0, Object arg1) {\n"
" java.lang.Object arg0, java.lang.Object arg1) {\n"
" switch (method) {\n"
" case NEW_MUTABLE_INSTANCE: {\n"
" return new $classname$();\n"

Loading…
Cancel
Save