Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 456906

Summary: [hashcode/equals] "Generate hashCode and equals" should not use raw type in generic class
Product: [Eclipse Project] JDT Reporter: Martin Fuller <martin_n_fuller>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: trivial    
Priority: P3    
Version: 4.4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Martin Fuller CLA 2015-01-07 07:23:47 EST
"Generate hashCode() and equals()" creates a line like:

MyClass other = (MyClass) obj;

In a generic class it should use wildcard parameters:

MyGenericClass<?> other = (MyGenericClass<?>) obj;

This will avoid a code warning: "MyGenericClass is a raw type. References to generic type MyGenericClass<T> should be parameterized".
Comment 1 Eclipse Genie CLA 2019-09-08 12:38:20 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Martin Fuller CLA 2019-09-10 09:42:21 EDT
The bug still occurs in 2019-03 (4.11.0).