[PAGES-232] Some @Data annotated classes do not include fields from superclass in equals / hashCode Created: 28/Jan/20  Updated: 31/Jan/20  Resolved: 28/Jan/20

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2

Type: Bug Priority: Neutral
Reporter: Michael Duerig Assignee: Michael Duerig
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLUI-5628 Some @Data annotated classes do not i... Closed
Relates
relates to MGNLUI-5628 Some @Data annotated classes do not i... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Sprint: UI Framework & 6.2 Ramp up 15
Story Points: 1

 Description   

Lombok's @Data annotation does not include fields from the super class in the generated equals and hashCode methods. This can lead to subtle bugs when instances of such classes are used as keys in a map. We should use the @EqualsAndHashCode(callSuper = true) annotation where necessary to explicitly include fields of super classes. Potential candidates are:

  • info.magnolia.rendering.spa.renderer.ConfiguredSpaRenderableDefinition

 


Generated at Mon Feb 12 06:16:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.