Index: third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc |
index 5c2900ceff64683542d6ac5eb90e86c8ae0e5356..b67eeb5326c8f255df4c84198eb13277d734e543 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc |
+++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc |
@@ -62,7 +62,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, |
int builderBitIndex, |
const FieldGeneratorInfo* info, |
ClassNameResolver* name_resolver, |
- std::map<string, string>* variables) { |
+ map<string, string>* variables) { |
SetCommonFieldVariables(descriptor, info, variables); |
(*variables)["empty_list"] = "com.google.protobuf.LazyStringArrayList.EMPTY"; |
@@ -71,8 +71,7 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, |
(*variables)["default_init"] = |
"= " + ImmutableDefaultValue(descriptor, name_resolver); |
(*variables)["capitalized_type"] = "String"; |
- (*variables)["tag"] = |
- SimpleItoa(static_cast<int32>(WireFormat::MakeTag(descriptor))); |
+ (*variables)["tag"] = SimpleItoa(WireFormat::MakeTag(descriptor)); |
(*variables)["tag_size"] = SimpleItoa( |
WireFormat::TagSize(descriptor->number(), GetType(descriptor))); |
(*variables)["null_check"] = |
@@ -80,11 +79,9 @@ void SetPrimitiveVariables(const FieldDescriptor* descriptor, |
" throw new NullPointerException();\n" |
" }\n"; |
(*variables)["writeString"] = |
- "com.google.protobuf.GeneratedMessage" + GeneratedCodeVersionSuffix() + |
- ".writeString"; |
+ "com.google.protobuf.GeneratedMessage.writeString"; |
(*variables)["computeStringSize"] = |
- "com.google.protobuf.GeneratedMessage" + GeneratedCodeVersionSuffix() + |
- ".computeStringSize"; |
+ "com.google.protobuf.GeneratedMessage.computeStringSize"; |
// TODO(birdo): Add @deprecated javadoc when generating javadoc is supported |
// by the proto compiler |
@@ -715,13 +712,7 @@ void RepeatedImmutableStringFieldGenerator:: |
GenerateInterfaceMembers(io::Printer* printer) const { |
WriteFieldDocComment(printer, descriptor_); |
printer->Print(variables_, |
- // NOTE: the same method in the implementation class actually returns |
- // com.google.protobuf.ProtocolStringList (a subclass of List). It's |
- // changed between protobuf 2.5.0 release and protobuf 2.6.1 release. |
- // To retain binary compatibility with both 2.5.0 and 2.6.1 generated |
- // code, we make this interface method return List so both methods |
- // with different return types exist in the compiled byte code. |
- "$deprecation$java.util.List<java.lang.String>\n" |
+ "$deprecation$com.google.protobuf.ProtocolStringList\n" |
" get$capitalized_name$List();\n"); |
WriteFieldDocComment(printer, descriptor_); |
printer->Print(variables_, |