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

Bug 99123

Summary: [Infer Type Arguments] should leave unparameterizable type raw
Product: [Eclipse Project] JDT Reporter: David Saff <david>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description David Saff CLA 2005-06-09 06:21:28 EDT
Against N20050609-0010, using the code example from bug 86447:

import java.util.ArrayList;
import java.util.List;

public class Z {
        
        void foo() {
            List l= new ArrayList();
            bar(l);
            l.add(new Object());
        }
        
        void bar(List<String> l2) {
            
        }
    }

On this class, if you infer generic types (and use default checkbox settings),
local l is inferred as List<?>, when the only valid type is raw List.
Comment 1 Dirk Baeumer CLA 2005-06-13 19:22:09 EDT
Markus, can you please comment.
Comment 2 Eclipse Genie CLA 2019-12-09 09:13:52 EST
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.