Bug 186089 - Static Model Classes do not implement equals/hashcode
Summary: Static Model Classes do not implement equals/hashcode
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: OHF (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Balazs Vadasz CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-05-09 04:29 EDT by Balazs Banfai CLA
Modified: 2012-01-05 13:32 EST (History)
1 user (show)

See Also:


Attachments
Compare support has been added to certain classes (8.39 KB, patch)
2007-05-15 07:49 EDT, Balazs Vadasz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Banfai CLA 2007-05-09 04:29:20 EDT
Static Model classes should implement equals in order to be comparable from a model perspective.
Comment 1 Balazs Vadasz CLA 2007-05-15 07:49:07 EDT
Created attachment 67216 [details]
Compare support has been added to certain classes

Compare support has been added for
org.eclipse.ohf.h3et.mif.core.ssm.Cardinality
org.eclipse.ohf.h3et.mif.core.ssm.impl.ArtefactImpl
org.eclipse.ohf.h3et.mif.core.ssm.impl.AssociationImpl
org.eclipse.ohf.h3et.mif.core.ssm.impl.AttributeImpl
org.eclipse.ohf.h3et.mif.core.ssm.impl.SSMContext
Comment 2 Balazs Banfai CLA 2007-05-15 07:56:15 EDT
Committed the contributed code, leaving the bug open for second patch with the missing classes.
Comment 3 Grahame Grieve CLA 2007-10-17 18:54:39 EDT
What's with this? I don't see the equals method in the classes mentioned. and why only those classes?

Should it be deep equals? or shallow? And what to do about circularities?
Comment 4 Balazs Banfai CLA 2007-10-18 03:57:43 EDT
We have implemented equals in our wrapper objects that wrap the ssm layer.  It performs shallow comparison. I wonder if that logic belongs to the ssm layer, however if someone changes it, our compare will break.  I mark this bug as fixed.