Commit 14e2f6cb authored by Brian Duff's avatar Brian Duff Committed by Gerrit Code Review

Merge "Includes a MessageNano subclass's name's hashCode in hashCode calculations."

parents e1458bba 87bd4029
......@@ -523,6 +523,7 @@ void MessageGenerator::GenerateHashCode(io::Printer* printer) {
printer->Indent();
printer->Print("int result = 17;\n");
printer->Print("result = 31 * result + getClass().getName().hashCode();\n");
for (int i = 0; i < descriptor_->field_count(); i++) {
const FieldDescriptor* field = descriptor_->field(i);
field_generators_.get(field).GenerateHashCodeCode(printer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment