empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harald Kirsch (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Created] (EMPIREDB-193) DBRowSet has an equals() implementation but no hashCode() implementation.
Date Sat, 21 Sep 2013 13:56:51 GMT
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

Mime
View raw message