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

Bug 349273

Summary: [1.7] Hover shows wrong message
Product: [Eclipse Project] JDT Reporter: Raksha Vasisht <raksha.vasisht>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert, deepakazad, jarthana, markus.kell.r, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Raksha Vasisht CLA 2011-06-14 02:58:19 EDT
BETA_JAVA7

Test:
-----
List<Integer> m() {
    	HashMap<String, ArrayList<Integer>> field= new HashMap<>();
    	return  (ArrayList<?>)field.get(0);		
}

Hover on the warning on field.get(0), it shows a message :

Type mismatch: cannot convert from ArrayList<capture#1-of ?> to List<Integer>

It does not make sense. Should show a more meaningful message . The message comes from jdt-core, need to investigate.
Comment 1 Ayushman Jain CLA 2011-06-14 07:13:15 EDT
This has always been the case ever since 1.5 came out. Even javac has the same error message.
Comment 2 Markus Keller CLA 2011-06-15 10:57:19 EDT
It's an error, not a warning, and it's not on "field.get(0)". It's on the whole CastExpression "(ArrayList<?>)field.get(0)", and there it is fine.
Comment 3 Jay Arthanareeswaran CLA 2011-06-27 09:33:40 EDT
Verified.