diff options
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_message_field.cc')
-rw-r--r-- | src/google/protobuf/compiler/javanano/javanano_message_field.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_message_field.cc b/src/google/protobuf/compiler/javanano/javanano_message_field.cc index 527121e6..6e12bf63 100644 --- a/src/google/protobuf/compiler/javanano/javanano_message_field.cc +++ b/src/google/protobuf/compiler/javanano/javanano_message_field.cc @@ -214,20 +214,12 @@ GenerateSerializedSizeCode(io::Printer* printer) const { void MessageOneofFieldGenerator:: GenerateEqualsCode(io::Printer* printer) const { - printer->Print(variables_, - "if (this.has$capitalized_name$()) {\n" - " if (!this.$oneof_name$_.equals(other.$oneof_name$_)) {\n" - " return false;\n" - " }\n" - "} else {\n" - " if (other.has$capitalized_name$()) {\n" - " return false;\n" - " }\n" - "}\n"); + GenerateOneofFieldEquals(variables_, printer); } void MessageOneofFieldGenerator:: GenerateHashCodeCode(io::Printer* printer) const { + GenerateOneofFieldHashCode(variables_, printer); } // =================================================================== |