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 140450 - Generated equals() and hashCode() could use Arrays method for array members
Summary: Generated equals() and hashCode() could use Arrays method for array members
Status: RESOLVED DUPLICATE of bug 142212
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 08:15 UTC by myrecek
Modified: 2009-02-19 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description myrecek 2008-07-17 08:15:00 UTC
When there is an array member in a class, say 
int [] a;
the "Generate equals() and hashCode()" uses a.equals() and a.hashCode(), hence the generic Object methods, which is not
very efficient.
It would be much nicer to use Arrays.equals(a) and Arrays.hashCode(a) instead.
Comment 1 Jan Lahoda 2008-12-08 08:37:28 UTC

*** This issue has been marked as a duplicate of 142212 ***