Bug 149532

Summary: Improve guessing of method type variable
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, reg.ecbz, srikanth_sankaran
Version: 3.2   
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2006-07-04 05:02:04 EDT
3.2
In the following code 'x' is unknown. If you hover over 'asList', you see that jdt.core guessed the type variable as 'Arrays': 
<Arrays> List<Arrays> java.util.Arrays.asList(Arrays... a)

This doesn't seem to do much sense. Why not just take Object (respective a bound of T)?

Quick fix uses this guess to offer fixes 

package pack;
import java.util.Arrays;
public class E {
    public void foo() {
    	return Arrays.asList( x );
    }
}
Comment 1 Olivier Thomann CLA 2009-12-09 11:47:53 EST
This is no longer an issue.
Now Object is suggested instead of Arrays.
Comment 2 Srikanth Sankaran CLA 2010-01-25 01:55:04 EST
Verified for 3.6M5 using build I20100122-0800