Bug 149532 - Improve guessing of method type variable
Summary: Improve guessing of method type variable
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-04 05:02 EDT by Martin Aeschlimann CLA
Modified: 2010-01-25 01:55 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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