This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 61369 - Classes overriding equals() but not hashCode()
Summary: Classes overriding equals() but not hashCode()
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Libor Fischmeistr
URL: http://www-128.ibm.com/developerworks...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 17:05 UTC by _ rkubacki
Modified: 2013-08-01 12:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2005-07-25 17:05:32 UTC
A class should override equals and hashCode or neither. If it override only one
of these methods there can be problem. Hashing of these objects can be affected.

org.netbeans.modules.db.explorer.DatabaseDriver [101]:
OverrideBothEqualsAndHashcode, Ensure you override both equals() and hashCode()
org.netbeans.modules.db.explorer.dataview.DataViewWindow [480]:
OverrideBothEqualsAndHashcode, Ensure you override both equals() and hashCode()
org.netbeans.modules.db.explorer.infos.ColumnNodeInfo [246]:
OverrideBothEqualsAndHashcode, Ensure you override both equals() and hashCode()
Comment 1 _ rkubacki 2005-07-25 22:06:35 UTC
ColumnElement and SortedListModel in dbschema have this problem too
Comment 2 _ rkubacki 2005-07-25 23:08:24 UTC
Especially ColumnModel is flawed! TableElementImpl code refering to Bugtraq
record #4396371 is full of stupid workaround just because of this bug and shows
no understanding what is wrong.
Comment 3 Petr Blaha 2006-03-13 13:32:15 UTC
TM 5.0 -> TBD
Comment 4 Andrei Badea 2007-02-15 17:26:05 UTC
Tricky, especially dbschema, but will try for 6.0.
Comment 5 David Vancouvering 2008-01-12 01:29:03 UTC
Not user reported, and does not appear to be causing problems for users.  Downgrading.
Comment 6 Jiri Rechtacek 2009-07-01 07:57:28 UTC
Reassigned to new owner.