Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349273 - [1.7] Hover shows wrong message
Summary: [1.7] Hover shows wrong message
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-14 02:58 EDT by Raksha Vasisht CLA
Modified: 2011-08-05 02:54 EDT (History)
6 users (show)

See Also:


Attachments

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