Pojo with additionalProperties and more than one property genrerate a borken hashCode function with empty parameters
Closed this issue · 2 comments
etremblay commented
Affect master, 3.4.8
Expected :
return java.util.Objects.hash(this.additionalProperties, prop1, prop2);
got
return java.util.Objects.hash(this.additionalProperties, , , prop1, prop2);
The modelPojo.mustache template can be fxed by replacing
return java.util.Objects.hash({{#vendorExtensions.additionalPropertiesMap}}this.additionalProperties{{#vars}}, {{/vars}}...
by
return java.util.Objects.hash({{#vendorExtensions.additionalPropertiesMap}}this.additionalProperties{{#vars.size}}, {{/vars.size}}...
sschnabe commented
@etremblay Thx for your report. PR is created.