Bug 335658 - [hashcode/equals] Should not warn when class has no fields and superclass implements methods
Summary: [hashcode/equals] Should not warn when class has no fields and superclass imp...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Windows Vista
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2011-01-28 03:03 EST by Aristónico Silvano Negro Diez CLA
Modified: 2011-02-02 10:59 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aristónico Silvano Negro Diez CLA 2011-01-28 03:03:33 EST
Hi!

The option Source -> Generate hashCode() and equals() shows one alert when one attribute selected in the list don't defined the methods equals() or hashCode().

The alert says "The field type '....' does not implement equals() and hashCode() - the resulting code may not work correctly".

But exist one exception. When the class which not defined the methods equals() or hashCode() has no attributes, this alert makes no sense.
It should look for the methods equals() or hashCode() in the super class.

Bye!


-- Configuration Details --
Product: Eclipse 1.2.2.20100122-1337 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.jdt 3.5.2.r352_v20100108-7r88FEwFI0WTuoBl0iaG0tyhfZH6
Comment 1 Olivier Thomann CLA 2011-01-28 12:19:21 EST
Move to JDT/UI
Comment 2 Markus Keller CLA 2011-02-02 10:59:12 EST
Agreed.