You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Harald Kirsch (JIRA)" <em...@incubator.apache.org> on 2013/09/21 15:56:51 UTC

[jira] [Created] (EMPIREDB-193) DBRowSet has an equals() implementation but no hashCode() implementation.

Harald Kirsch created EMPIREDB-193:
--------------------------------------

             Summary: DBRowSet has an equals() implementation but no hashCode() implementation.
                 Key: EMPIREDB-193
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-193
             Project: Empire-DB
          Issue Type: Bug
    Affects Versions: empire-db-2.4.1
            Reporter: Harald Kirsch


If equals() is implemented other than as object identity, hashCode() must be implemented too. Otherwise two equal objects may have a different hash code, which violates the contract define in java.lang.Object.

Workaround: never use a DBRowSet as a key in a hash table and don't use java.util.Set to unique a list of tables.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira