Bug 165453

Summary: [1.5][compiler] Improve unchecked cast message in compiler's warning
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.3   
Target Milestone: 3.3 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2006-11-22 10:21:06 EST
The message that the compiler emits for unchecked cast should be improved.
Before:
Type safety: The cast from Object to List<? extends Object> is actually checking against the erased type List 
After:
Type safety: Unchecked cast from Object to List<? extends Object>
Comment 1 Philipe Mulet CLA 2006-11-22 10:24:10 EST
The rationale is that after tuning the compiler for unchecked cast semantics, the old message was showing its age. Suggesting a raw type instead is just wrong.
Unchecked cast (jls5.5) are situations where parameterization is inadequate. It doesn't mean it should go away. Also we are planning to report raw types in cast types so this would be plain wrong to suggest their usage.

Also see bug 165145, bug 165143.
Comment 2 Olivier Thomann CLA 2006-11-22 22:15:57 EST
Released for 3.3M4.
Comment 3 David Audel CLA 2006-12-12 12:17:25 EST
Verified for 3.3M4 with I20061212-0010.