Many UIMA framework objects implement the MetaDataObject interface.

This interface has an equals method, which does a attribute by attribute equals check (recursively).

This interface, however, doesn't implement the hashCode method. So, if any object were to insert one of these objects into a hash table, two "equal" objects could get different hash codes.

For instance, TypeOrFeature instances implements the MetaDataObject. It might be stored in a hash table or hash set (this was done in the previous impl of ResultSpecification _impl). Wouldn't this (at least in principle, theoretically) cause a problem? Is the general, safe, fix to add a hashCode method to the MetaDataObject interface and impl?

-Marshall

Reply via email to