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

Bug 102841

Summary: [quick fix] 'Change to a_type' does not consider generics
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Martin Aeschlimann <martinae>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk_baeumer
Version: 3.1   
Target Milestone: 3.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-07-06 09:38:23 EDT
I20050627-1435 (3.1)

    HashMap<Integer, String> idToName= new HashMap<Integer, String>();
    String entries1= idToName.entrySet();
    XXX entries2= idToName.entrySet();

The quick fix for entries1 is:
    Change type of 'entries1' to Set<Entry<Integer, String>>

The quick fix for XXX is:
    Change to 'Set' (java.util)

Expected: quick fix for XXX also offers Set<Entry<Integer, String>>, and not
only the raw type.
Comment 1 Dirk Baeumer CLA 2005-07-07 12:43:07 EDT
Martin, is this something we should conisder for 3.1.1 ?
Comment 2 Dirk Baeumer CLA 2005-07-11 06:05:27 EDT
Martin, can you please investigate for 3.1.1 and explain the risk of the fix.
Comment 3 Martin Aeschlimann CLA 2005-07-12 10:46:16 EDT
This is a bigger fix and could only be added to 3.1.1 if we decide to make a
greater (non-minimal) update to quickfixes with generics.
Comment 4 Dirk Baeumer CLA 2005-07-13 09:23:54 EDT
Can you explore the greater update to quick fix in 3.2 so that we can decide if
we want to add it to 3.1.1.
Comment 5 Dirk Baeumer CLA 2005-08-08 06:35:14 EDT
Martin, will bug 106069 address this one as well ?
Comment 6 Martin Aeschlimann CLA 2005-08-09 03:49:54 EDT
No, bug 106069 does not address this problem.
I released a fix for this one to 3.2. When it looks good then I'll add an extra
patch to bug 106069.
The fix for this one is to add extra quick fixes. Before suggesting this fix for
3.1.1 I want to make sure that the new proposals don't conflict with the other
proposals. E.g. you will get:

Change to List
Change to List<String>
Comment 7 Martin Aeschlimann CLA 2005-08-19 09:56:44 EDT
IMO not highly important for 3.1.1
Comment 8 Dirk Baeumer CLA 2005-08-19 11:47:55 EDT
Agree.
Comment 9 Martin Aeschlimann CLA 2005-08-21 14:33:18 EDT
this is already in 3.2 M1
Comment 10 Benno Baumgartner CLA 2005-12-13 08:33:33 EST
verified 20051213-0010