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

Bug 202481

Summary: [quick fix] Add Type Parameters quick fix only computes one level of generic types
Product: [Eclipse Project] JDT Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: kenneth, martinae, Olivier_Thomann, stephan.herrmann
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Nick Edgar CLA 2007-09-06 11:33:49 EDT
3.3

Had a type safety warning on:
  Map<ComponentEntry, Map<ComponentEntry, List<IProject>>> moveMap = new HashMap();

Chose the Add Type Parameters quick-fix.  The result was:
  Map<ComponentEntry, Map<ComponentEntry, List<IProject>>> moveMap = new HashMap<ComponentEntry, Map>();
        
which generates a type-mismatch error.

I expected:
  Map<ComponentEntry, Map<ComponentEntry, List<IProject>>> moveMap = new HashMap<ComponentEntry, Map<ComponentEntry, List<IProject>>>();
Comment 1 Olivier Thomann CLA 2007-09-06 11:37:56 EDT
Move to JDT/UI
Comment 2 Eclipse Genie CLA 2019-06-18 04:06:51 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 3 Kenneth Styrberg CLA 2019-08-05 13:25:52 EDT
Cannot reproduce in Eclipse 2019-06 Java 1.8.

One note is that we should probably suggest the empty diamond operator '<>' for Java >= 1.7 instead of all of the type parameters.
Comment 4 Stephan Herrmann CLA 2019-08-05 15:46:53 EDT
(In reply to Kenneth Styrberg from comment #3)
> Cannot reproduce in Eclipse 2019-06 Java 1.8.
> 
> One note is that we should probably suggest the empty diamond operator '<>'
> for Java >= 1.7 instead of all of the type parameters.

Sounds good.
I assume this would be a separate quick fix, since it is not actually adding any type arguments (all this under the assumption that this bug is indeed about type *arguments* not type *parameters*).