SynBioDex-archive / libSBOLj

deprecated libSBOL Java library
http://SynBioDex.github.com/libSBOLj
2 stars 0 forks source link

DnaComponent.equals, "getClass() != obj.getClass()" should be > "obj instanceof DnaComponent" #21

Open mgaldzic opened 13 years ago

mgaldzic commented 13 years ago

in DnaComponent.equals, "getClass() != obj.getClass()" should be

"obj instanceof DnaComponent". Also, instead of doing a lot of if then comparisons, would it be simpler if the hashCode is overwritten to use the instance values?

good point. fiy the .equals methods where auto generated by netbeans. As you may have noticed Tests dont exist yet or those that i started wrtting dont work yet. I'll get back to testing

mgaldzic commented 13 years ago

made some changes to .equals and hasCode for all objects to fulfill requirements to pass basic service tests. Look like I have yet to address this issue completely. But hashCode now uses the field values from the instance, for all objects.