AVRO-4202: Refer to fields for generated hashCode#3547
AVRO-4202: Refer to fields for generated hashCode#3547RyanSkraba merged 1 commit intoapache:mainfrom
Conversation
The generated hashCode function has a local parameter called result. To prevent this local variable to conflict with field which have the same name, it has to refer to the fields with `this.<fieldName>` making it unambiguous refer to fields and not local variables.
The generated hashCode function has a local parameter called result. To prevent this local variable to conflict with field which have the same name, it has to refer to the fields with `this.<fieldName>` making it unambiguous refer to fields and not local variables.
|
Thanks so much for this fix! It should be included in the next minor release. Let me know if you want me to assign you this JIRA! I've marked it as Resolved, but I didn't find an account for you. |
|
@RyanSkraba thanks a lot for cherry picking. |
Hi @RyanSkraba, Thanks in advance! |
|
Hello @martin-g @RyanSkraba following @ratajka comment, do you any predictions on release the 1.12.1 or 1.13.0? I see the release cycle being one year and wanted to have an expectation on when to expect. Thank you |
|
No idea! |
The generated hashCode function has a local parameter called result. To prevent this local variable to conflict with field which have the same name, it has to refer to the fields with
this.<fieldName>making it unambiguous refer to fields and not local variables.What is the purpose of the change
Fix a name collision in the generated
hashCodefunction reported in AVRO-4202Verifying this change
This change is a trivial rework I also manually verified. Let me know if you want an extra test.
Documentation