aboutsummaryrefslogtreecommitdiffstats
path: root/src/google/protobuf/compiler/javanano/javanano_message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_message.cc')
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc
index 0cf9f97..7a2b4a0 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message.cc
@@ -501,11 +501,7 @@ void MessageGenerator::GenerateEquals(io::Printer* printer) {
if (params_.store_unknown_fields()) {
printer->Print(
- "if (unknownFieldData == null || unknownFieldData.isEmpty()) {\n"
- " return other.unknownFieldData == null || other.unknownFieldData.isEmpty();"
- "} else {\n"
- " return unknownFieldData.equals(other.unknownFieldData);\n"
- "}\n");
+ "return unknownFieldDataEquals(other);\n");
} else {
printer->Print(
"return true;\n");
@@ -534,8 +530,7 @@ void MessageGenerator::GenerateHashCode(io::Printer* printer) {
if (params_.store_unknown_fields()) {
printer->Print(
- "result = 31 * result + (unknownFieldData == null || unknownFieldData.isEmpty()\n"
- " ? 0 : unknownFieldData.hashCode());\n");
+ "result = 31 * result + unknownFieldDataHashCode();\n");
}
printer->Print("return result;\n");